summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-syncop.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-syncop.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-syncop.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.c b/xlators/mgmt/glusterd/src/glusterd-syncop.c
index 835cc4ea827..fa0aa47c0c2 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -857,7 +857,7 @@ out:
if (req_dict)
dict_unref (req_dict);
- if (rsp_dict)
+ if (ret && rsp_dict)
dict_unref (rsp_dict);
if (op_errstr)
@@ -882,8 +882,6 @@ glusterd_op_begin_synctask (rpcsvc_request_t *req, glusterd_op_t op,
gd_sync_task_begin (dict, req);
ret = 0;
out:
- if (dict)
- dict_unref (dict);
return ret;
}