Skip to content

Commit

Permalink
re-added required null checks
Browse files Browse the repository at this point in the history
Change-Id: Ic3e0a9c8b2db515ca4b5eedfda36b54c4ac9f77b
  • Loading branch information
harshita-shree committed Mar 29, 2022
1 parent f3455a5 commit 5f2dcbb
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions xlators/cluster/afr/src/afr-inode-read.c
Original file line number Diff line number Diff line change
Expand Up @@ -912,12 +912,16 @@ afr_update_local_dicts(call_frame_t *frame, dict_t *dict, dict_t *xdata)
UNLOCK(&frame->lock);
}

if (dict_copy(dict, local->dict) == NULL) {
goto done;
if (dict != NULL) {
if (dict_copy(dict, local->dict) == NULL) {
goto done;
}
}

if (dict_copy(xdata, local->xdata_rsp) == NULL) {
goto done;
if (xdata != NULL) {
if (dict_copy(xdata, local->xdata_rsp) == NULL) {
goto done;
}
}

ret = 0;
Expand Down

0 comments on commit 5f2dcbb

Please sign in to comment.