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