diff options
| author | Pranith K <pranithk@gluster.com> | 2011-03-21 07:26:30 +0000 |
|---|---|---|
| committer | gluster-ant <bugzilla-bot@gluster.org> | 2011-03-21 07:26:30 +0000 |
| commit | c694bac18e7635dd83fe8a6d284302f0ad763ada (patch) | |
| tree | f7bb14d13629db9172f632c988f5b5571023361b /cli/src | |
| parent | bf157dabadfc9c1c01d1faebb701f4ec4b6eec62 (diff) | |
cli: Fix memory leak in gluster profile
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 2571 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2571
Diffstat (limited to 'cli/src')
| -rw-r--r-- | cli/src/cli-rpc-ops.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index 2a7aa17fcb..bb67af40c9 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; } |
