Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAOS-6686 cart: Fix coverity defect #4517

Merged
merged 1 commit into from
Feb 4, 2021
Merged

DAOS-6686 cart: Fix coverity defect #4517

merged 1 commit into from
Feb 4, 2021

Conversation

dmiter
Copy link
Contributor

@dmiter dmiter commented Feb 3, 2021

Fix possible NULL pointer dereference on error pass handling.

    	22. assign_zero: Assigning: rpc_priv->crp_hg_hdl = NULL.
 884                        rpc_priv->crp_hg_hdl = NULL;
 885                        RPC_ERROR(rpc_priv,
 886                                  "HG_Reset failed, hg_ret: %d\n",
 887                                  hg_ret);
 888                        rc = -DER_HG;
 889                }
 890        }
 891
 892        if (crt_gdata.cg_sep_mode == true) {
    	
CID 290781 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)
28. var_deref_model: Passing null pointer rpc_priv->crp_hg_hdl to HG_Set_target_id, which dereferences it. [hide details]
 893                hg_ret = HG_Set_target_id(rpc_priv->crp_hg_hdl,
/install/prereq/release/mercury/include/mercury.h
1110HG_Set_target_id(hg_handle_t handle, hg_uint8_t id)
1111{
    	1. deref_parm: Directly dereferencing parameter handle.
1112    handle->info.context_id = id;
1113
1114    return HG_Core_set_target_id(handle->core_handle, id);
1115}

Fix possible NULL pointer dereference on error pass handling.

Signed-off-by: Dmitry Eremin <[email protected]>
Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. No errors found by checkpatch.

@dmiter dmiter requested a review from a team February 3, 2021 19:07
Copy link
Contributor

@jolivier23 jolivier23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add gatekeeper back after testing is complete

@dmiter dmiter requested a review from a team February 4, 2021 05:51
@jolivier23 jolivier23 merged commit d335773 into master Feb 4, 2021
@jolivier23 jolivier23 deleted the deremin/DAOS-6686 branch February 4, 2021 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants