From b230793b8b345ff25168567209cae10294b53f23 Mon Sep 17 00:00:00 2001 From: Pranith K Date: Mon, 21 Mar 2011 07:26:30 +0000 Subject: cli: Fix memory leak in gluster profile Signed-off-by: Pranith Kumar K Signed-off-by: Vijay Bellur BUG: 2571 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2571 --- cli/src/cli-rpc-ops.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cli/src') diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index 2a7aa17fcb7..bb67af40c95 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -3081,6 +3081,8 @@ gf_cli3_1_profile_volume_cbk (struct rpc_req *req, struct iovec *iov, gf_log ("", GF_LOG_ERROR, "Unable to allocate memory"); goto out; + } else { + dict->extra_stdfree = rsp.stats_info.stats_info_val; } ret = dict_get_int32 (dict, "op", (int32_t*)&op); @@ -3109,6 +3111,10 @@ gf_cli3_1_profile_volume_cbk (struct rpc_req *req, struct iovec *iov, ret = rsp.op_ret; out: + if (dict) + dict_unref (dict); + if (rsp.op_errstr) + free (rsp.op_errstr); cli_cmd_broadcast_response (ret); return ret; } -- cgit