summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-handler.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-handler.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index 891c1a97da5..12f3705b5e7 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -898,10 +898,11 @@ glusterd_handle_volume_lock_fn (rpcsvc_request_t *req)
out:
if (ret) {
- if (ctx->dict)
- dict_destroy (ctx->dict);
- if (ctx)
+ if (ctx) {
+ if (ctx->dict)
+ dict_destroy (ctx->dict);
GF_FREE (ctx);
+ }
}
glusterd_friend_sm ();
@@ -982,10 +983,11 @@ glusterd_handle_volume_unlock_fn (rpcsvc_request_t *req)
out:
if (ret) {
- if (ctx->dict)
- dict_destroy (ctx->dict);
- if (ctx)
+ if (ctx) {
+ if (ctx->dict)
+ dict_destroy (ctx->dict);
GF_FREE (ctx);
+ }
}
glusterd_friend_sm ();