From a57980e37416994b99b20d19a495527fb49c0372 Mon Sep 17 00:00:00 2001 From: Sheetal Pamecha Date: Thu, 9 Apr 2020 01:59:03 +0530 Subject: protocol/server: Fix coverity issue RESOURCE_LEAK Handle case of arg not freed CID: 1422174 Updates: #1060 Change-Id: Ibd03908a3ea8369035c2b7f6e024b3e5be48f436 Signed-off-by: Sheetal Pamecha --- xlators/protocol/server/src/server.c | 1 + 1 file changed, 1 insertion(+) (limited to 'xlators/protocol/server/src/server.c') diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c index 5b76b49cc82..48f4d0a7f87 100644 --- a/xlators/protocol/server/src/server.c +++ b/xlators/protocol/server/src/server.c @@ -407,6 +407,7 @@ server_call_xlator_mem_cleanup(xlator_t *this, char *victim_name) if (!arg->victim_name) { gf_smsg(this->name, GF_LOG_CRITICAL, ENOMEM, LG_MSG_NO_MEMORY, "Memory allocation is failed"); + free(arg); return; } -- cgit