summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2011-03-31 06:05:41 +0000
committerVijay Bellur <vijay@gluster.com>2011-04-06 11:10:18 -0700
commit06c954a910fe8749b362490c62e5b49be5b0c385 (patch)
treeba88e65e43fa93fd51b497325b6afb34e442037c
parent8e8d4e0869623f352c7993293c6e132d795a34bf (diff)
check dict before unrefing it
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2642 ([glusterfs-3.2.0qa5]: invalid reads in glusterd) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2642
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index 386496ac7..f6b0ddf9a 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -3038,7 +3038,7 @@ out:
if (tmp_dict)
dict_unref (tmp_dict);
- if (ret)
+ if (ret && dict)
dict_unref (dict);
if (cli_req.dict_req.dict_req_val)
free (cli_req.dict_req.dict_req_val);