summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshishir gowda <sgowda@redhat.com>2013-10-25 12:05:01 +0530
committershishir gowda <sgowda@redhat.com>2013-10-25 12:09:58 +0530
commitbfb9fb693abd868fbb3187bc49598bdf0eba462e (patch)
tree25cacd451921577a66dc86363b8d06709597d9e9
parenta7bab2ce0ec0f720a74a4201b0d72344323e9c3b (diff)
mgmt/glusterd: Fix glusterd crash due to extra unref
Change-Id: I9d600b4d971b7fdcd54da50e4a069eab19648fa6 Original-author: Rajesh Joseph <rajeshatredhat@redhat.com> Signed-off-by: shishir gowda <sgowda@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index 00fc7daa0..48a5b7be7 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -2276,8 +2276,11 @@ glusterd_handle_snapshot_fn (rpcsvc_request_t *req)
goto out;
}
ret = dict_set_dynstr (dict, "host-uuid", host_uuid);
- if (ret)
+ if (ret) {
+ GF_FREE (host_uuid);
goto out;
+ }
+
} else {
gf_log (this->name, GF_LOG_ERROR, "request dict length is %d",
@@ -2307,7 +2310,6 @@ glusterd_handle_snapshot_fn (rpcsvc_request_t *req)
out:
if (ret) {
- GF_FREE (host_uuid);
if (err_str[0] == '\0')
snprintf (err_str, sizeof (err_str),
"Operation failed");