summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-handler.c
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2019-04-24 22:02:51 +0530
committerAtin Mukherjee <amukherj@redhat.com>2019-04-25 06:39:16 +0000
commitc827682e4df44ec6aaae3780c325568fb43053ff (patch)
treeac7ddc6c908f18f9c163dbd19302d6274b7111d3 /xlators/mgmt/glusterd/src/glusterd-handler.c
parent647e2d3a9fbe36f2fbf062feda53b7cb6aa4830b (diff)
glusterd: coverity fixes
Addresses the following: * CID 1124776: Resource leaks (RESOURCE_LEAK) - Variable "aa" going out of scope leaks the storage it points to in glusterd-volgen.c * Bunch of CHECKED_RETURN defects in the callers of synctask_barrier_init * CID 1400755: Error handling issues (CHECKED_RETURN) - Calling "gf_is_service_running" without checking return value in xlators/mgmt/glusterd/src/glusterd-shd-svc.c: 671 in glusterd_shdsvc_stop() * CID 1400745: Memory - illegal accesses (USE_AFTER_FREE) - Dereferencing freed pointer "volinfo" in /xlators/mgmt/glusterd/src/glusterd-shd-svc.c: 460 in glusterd_shdsvc_start() * CID 1400742: Program hangs (LOCK) - adding annotation to fix this false positive Updates: bz#789278 Change-Id: I02f16e7eeb8c5cf72f7d0b29d00df4f03b3718b3 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-handler.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index 678425a19a8..4b069574bbd 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -3288,6 +3288,12 @@ glusterd_friend_remove(uuid_t uuid, char *hostname)
ret = glusterd_peerinfo_cleanup(peerinfo);
out:
gf_msg_debug(THIS->name, 0, "returning %d", ret);
+ /* We don't need to do a mutex unlock of peerinfo->delete_lock as the same
+ * will be anyway destroyed within glusterd_peerinfo_cleanup, coverity
+ * though cries about it
+ */
+ /* coverity[LOCK] */
+
return ret;
}