Skip to content

Commit

Permalink
DAOS-16514 vos: fix coverity issue (#15083)
Browse files Browse the repository at this point in the history
Fix coverity 2555843 explict null dereferenced.

Signed-off-by: Niu Yawei <[email protected]>
  • Loading branch information
NiuYawei authored Sep 6, 2024
1 parent 1353284 commit bb1b7c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vos/vos_obj.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bb1b7c8

Please sign in to comment.