From df697c68f6e1d676ae101e18b19f69e7241dc84a Mon Sep 17 00:00:00 2001 From: Shwetha K Acharya Date: Fri, 7 Sep 2018 11:20:49 +0530 Subject: 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 --- xlators/mgmt/glusterd/src/glusterd-sm.c | 1 + 1 file changed, 1 insertion(+) (limited to 'xlators/mgmt') 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); -- cgit