a3470f
From 4ff96e11ea80d9a0d9dec2031c9cdd99d2afdc61 Mon Sep 17 00:00:00 2001
a3470f
From: Sanju Rakonde <srakonde@redhat.com>
a3470f
Date: Mon, 30 Apr 2018 11:12:34 +0530
a3470f
Subject: [PATCH 246/260] glusterd: Fix for memory leak in get-state detail
a3470f
a3470f
>Fixes: bz#1573066
a3470f
>Change-Id: I76fe3bdde7351736b32eb3d6c4cc5f8f276257ed
a3470f
>Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
a3470f
a3470f
upstream patch: https://review.gluster.org/#/c/19948/
a3470f
a3470f
BUG: 1567899
a3470f
Change-Id: I76fe3bdde7351736b32eb3d6c4cc5f8f276257ed
a3470f
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
a3470f
Reviewed-on: https://code.engineering.redhat.com/gerrit/137469
a3470f
Tested-by: RHGS Build Bot <nigelb@redhat.com>
a3470f
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
a3470f
---
a3470f
 xlators/mgmt/glusterd/src/glusterd-handler.c | 9 ++++++++-
a3470f
 1 file changed, 8 insertions(+), 1 deletion(-)
a3470f
a3470f
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
a3470f
index 30adb99..962c87e 100644
a3470f
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
a3470f
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
a3470f
@@ -5409,8 +5409,15 @@ out:
a3470f
         if (pending_node)
a3470f
                 GF_FREE (pending_node);
a3470f
 
a3470f
-        if (brick_req)
a3470f
+        if (brick_req) {
a3470f
+                if (brick_req->input.input_val)
a3470f
+                        GF_FREE (brick_req->input.input_val);
a3470f
                 GF_FREE (brick_req);
a3470f
+        }
a3470f
+        if (args.dict)
a3470f
+                dict_unref (args.dict);
a3470f
+        if (args.errstr)
a3470f
+                GF_FREE (args.errstr);
a3470f
 
a3470f
         return ret;
a3470f
 }
a3470f
-- 
a3470f
1.8.3.1
a3470f