From bb1b7c855f9c39c639ae62272cde6e7cbf04aa13 Mon Sep 17 00:00:00 2001 From: Niu Yawei Date: Fri, 6 Sep 2024 20:24:41 +0800 Subject: [PATCH] DAOS-16514 vos: fix coverity issue (#15083) Fix coverity 2555843 explict null dereferenced. Signed-off-by: Niu Yawei --- src/vos/vos_obj.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vos/vos_obj.c b/src/vos/vos_obj.c index b4e772b1e29..77cb041711f 100644 --- a/src/vos/vos_obj.c +++ b/src/vos/vos_obj.c @@ -1701,7 +1701,8 @@ vos_obj_iter_prep(vos_iter_type_t type, vos_iter_param_t *param, return -DER_NOMEM; /* ip_hdl is dkey or akey tree open handle for vos_iterate_key() */ - if (!(param->ip_flags & VOS_IT_KEY_TREE)) { + if (param->ip_flags != VOS_IT_KEY_TREE) { + D_ASSERT(!(param->ip_flags & VOS_IT_KEY_TREE)); cont = vos_hdl2cont(param->ip_hdl); is_sysdb = cont->vc_pool->vp_sysdb; dth = vos_dth_get(is_sysdb);