summaryrefslogtreecommitdiffstats
path: root/glusterfsd/src
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2012-02-22 18:27:15 +0530
committerVijay Bellur <vijay@gluster.com>2012-02-22 21:21:22 -0800
commit683ce1bca3b6c541e565eec014fa7cc3308957d8 (patch)
treeec726c410b727fb40a8e6777cacee2c7325cd3d2 /glusterfsd/src
parentca502ca780202c71623a34349c88d114ad58ec12 (diff)
glusterfsd: unref the dict and use dict_set_dynstr to avoid memleak
Unref the new dict and use proper dict api (dict_set_dynstr) to save data for displaying volume status information, which otherwise leads to memory leak in the process. Change-Id: Icb9ceb1a867c5b9759211a67027d983ab9b7e1c2 BUG: 796186 Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-on: http://review.gluster.com/2799 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'glusterfsd/src')
-rw-r--r--glusterfsd/src/glusterfsd-mgmt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index 4220baf982c..5afa558dd70 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -932,6 +932,8 @@ glusterfs_handle_brick_status (rpcsvc_request_t *req)
out:
if (dict)
dict_unref (dict);
+ if (output)
+ dict_unref (output);
if (brick_req.input.input_val)
free (brick_req.input.input_val);
if (xname)