diff options
author | Shwetha K Acharya <sacharya@redhat.com> | 2018-09-07 11:20:49 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2018-09-07 16:15:02 +0000 |
commit | df697c68f6e1d676ae101e18b19f69e7241dc84a (patch) | |
tree | 9ec78f7b8f355a20199f066c371c082dff842b52 /xlators/mgmt | |
parent | 82640b7109ef83ed6cc5054c81d076aa3398d249 (diff) |
glusterd-sm: NULL pointer dereferencing clang fix
Problem: new_event could be NULL.
Solution: Added a goto statement to address this issue.
Updates: bz#1193929
Change-Id: Id3ce28fc53ad2cc8b9fcb63f7774568d31073b9e
Signed-off-by: Shwetha K Acharya <sacharya@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-sm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-sm.c b/xlators/mgmt/glusterd/src/glusterd-sm.c index c048e382970..0a52cc92a58 100644 --- a/xlators/mgmt/glusterd/src/glusterd-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-sm.c @@ -993,6 +993,7 @@ glusterd_ac_handle_friend_add_req (glusterd_friend_sm_event_t *event, void *ctx) if (ret) { gf_msg (this->name, GF_LOG_ERROR, ENOMEM, GD_MSG_NO_MEMORY, "Out of Memory"); + goto out; } new_event->peername = gf_strdup (event->peername); |