summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-log-ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-log-ops.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-log-ops.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-log-ops.c b/xlators/mgmt/glusterd/src/glusterd-log-ops.c
index 4b35afde776..9ab52a349b8 100644
--- a/xlators/mgmt/glusterd/src/glusterd-log-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-log-ops.c
@@ -72,15 +72,15 @@ glusterd_handle_log_rotate (rpcsvc_request_t *req)
ret = glusterd_op_begin (req, GD_OP_LOG_ROTATE, dict);
out:
- if (ret && dict)
- dict_unref (dict);
-
glusterd_friend_sm ();
glusterd_op_sm ();
- if (ret)
+ if (ret) {
ret = glusterd_op_send_cli_response (cli_op, ret, 0, req,
- NULL, "operation failed");
+ dict, "operation failed");
+ if (dict)
+ dict_unref (dict);
+ }
free (cli_req.dict.dict_val);
return ret;