e7a346
From 4bfbc59a0cbfb28325c16e81480decab003fe6d1 Mon Sep 17 00:00:00 2001
e7a346
From: shujun10086 <shujun.huang@nokia-sbell.com>
e7a346
Date: Tue, 2 Oct 2018 08:37:17 +0000
e7a346
Subject: [PATCH 410/444] cli: fix glusterd memory leak cause by "gluster v
e7a346
 status volume_name"
e7a346
e7a346
If use this command every some seconds for example 15s to check gluster brick
e7a346
status, the glusterd will use about 1G memory in a year. free the value of rsp
e7a346
in gf_cli_status_cbk. glusterd allocate the value of rsp and send it to cli, but
e7a346
cli do not free the value, that cause glusterd memory leak.
e7a346
e7a346
> fixes: bz#1635480
e7a346
> Change-Id: I3f19cd0d4b791ae1b35f9664b3a668b1579f1178
e7a346
> Signed-off-by: shujun10086 <shujun.huang@nokia-sbell.com>
e7a346
e7a346
upstream patch: https://review.gluster.org/#/c/21316/
e7a346
e7a346
Change-Id: I3f19cd0d4b791ae1b35f9664b3a668b1579f1178
e7a346
BUG: 1635100
e7a346
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
e7a346
Reviewed-on: https://code.engineering.redhat.com/gerrit/154882
e7a346
Tested-by: RHGS Build Bot <nigelb@redhat.com>
e7a346
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
e7a346
---
e7a346
 cli/src/cli-rpc-ops.c | 1 +
e7a346
 1 file changed, 1 insertion(+)
e7a346
e7a346
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
e7a346
index 54b61ee65..10f772c 100644
e7a346
--- a/cli/src/cli-rpc-ops.c
e7a346
+++ b/cli/src/cli-rpc-ops.c
e7a346
@@ -8515,6 +8515,7 @@ cont:
e7a346
         ret = rsp.op_ret;
e7a346
 
e7a346
 out:
e7a346
+        FREE(rsp.dict.dict_val);
e7a346
         if (dict)
e7a346
                 dict_unref (dict);
e7a346
         GF_FREE (status.brick);
e7a346
-- 
e7a346
1.8.3.1
e7a346