diff options
| author | Pranith K <pranithk@gluster.com> | 2011-03-21 07:26:30 +0000 | 
|---|---|---|
| committer | Vijay Bellur <vijay@dev.gluster.com> | 2011-03-22 04:02:14 -0700 | 
| commit | b230793b8b345ff25168567209cae10294b53f23 (patch) | |
| tree | 86f29e5c1e341fed3bbd183f86b3ae9afbb33433 /cli | |
| parent | 6167c66758de454284560474f3b4a893d8a69965 (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')
| -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 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;  }  | 
