From 04a98cd88e9e9eb9f7bc6c174671d82ece666fbf Mon Sep 17 00:00:00 2001 From: shujun10086 Date: Tue, 2 Oct 2018 08:37:17 +0000 Subject: 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 --- cli/src/cli-rpc-ops.c | 1 + 1 file changed, 1 insertion(+) mode change 100644 => 100755 cli/src/cli-rpc-ops.c (limited to 'cli') diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c old mode 100644 new mode 100755 index 850658b2a2e..694976b0e4a --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -8442,6 +8442,7 @@ cont: ret = rsp.op_ret; out: + FREE(rsp.dict.dict_val); if (dict) dict_unref(dict); GF_FREE(status.brick); -- cgit