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