summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server.c
diff options
context:
space:
mode:
authorSheetal Pamecha <spamecha@redhat.com>2020-04-09 01:59:03 +0530
committerMOHIT AGRAWAL <moagrawa@redhat.com>2020-04-10 03:29:44 +0000
commita57980e37416994b99b20d19a495527fb49c0372 (patch)
tree286a4cd164e8a9f3628def0059a8ddb63efa9526 /xlators/protocol/server/src/server.c
parent82db4f23d201b1078129d083370563f68251d897 (diff)
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 <spamecha@redhat.com>
Diffstat (limited to 'xlators/protocol/server/src/server.c')
-rw-r--r--xlators/protocol/server/src/server.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
index 5b76b49..48f4d0a 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;
}