summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-handler.c
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2010-08-26 11:42:24 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-08-27 01:50:42 -0700
commit7fc38ce7783891218a0cb83d233d579e64831e33 (patch)
tree5a9c5eb7557ea335142e08e09ea9b4c5e16ccb0c /xlators/mgmt/glusterd/src/glusterd-handler.c
parent67d8b620186807f38277713930da2a1d1926d6d0 (diff)
mgmt/glusterd: free op ctx only if it is allocated
Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1236 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1236
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-handler.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index 65791d413c3..6c99ae70b6e 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -2097,6 +2097,8 @@ glusterd_create_volume (rpcsvc_request_t *req, dict_t *dict)
glusterd_op_set_ctx (GD_OP_CREATE_VOLUME, dict);
+ glusterd_op_set_ctx_free (GD_OP_CREATE_VOLUME, _gf_true);
+
glusterd_op_set_req (req);
data = dict_get (dict, "volname");
@@ -2140,6 +2142,7 @@ glusterd_start_volume (rpcsvc_request_t *req, char *volname, int flags)
glusterd_op_set_op (GD_OP_START_VOLUME);
glusterd_op_set_ctx (GD_OP_START_VOLUME, ctx);
+ glusterd_op_set_ctx_free (GD_OP_START_VOLUME, _gf_true);
glusterd_op_set_req (req);
ret = glusterd_op_txn_begin ();
@@ -2167,6 +2170,7 @@ glusterd_stop_volume (rpcsvc_request_t *req, char *volname, int flags)
glusterd_op_set_op (GD_OP_STOP_VOLUME);
glusterd_op_set_ctx (GD_OP_STOP_VOLUME, ctx);
+ glusterd_op_set_ctx_free (GD_OP_STOP_VOLUME, _gf_true);
glusterd_op_set_req (req);
ret = glusterd_op_txn_begin ();
@@ -2194,6 +2198,7 @@ glusterd_delete_volume (rpcsvc_request_t *req, char *volname, int flags)
glusterd_op_set_op (GD_OP_DELETE_VOLUME);
glusterd_op_set_ctx (GD_OP_DELETE_VOLUME, ctx);
+ glusterd_op_set_ctx_free (GD_OP_DELETE_VOLUME, _gf_true);
glusterd_op_set_req (req);
ret = glusterd_op_txn_begin ();
@@ -2213,6 +2218,7 @@ glusterd_add_brick (rpcsvc_request_t *req, dict_t *dict)
glusterd_op_set_op (GD_OP_ADD_BRICK);
glusterd_op_set_ctx (GD_OP_ADD_BRICK, dict);
+ glusterd_op_set_ctx_free (GD_OP_ADD_BRICK, _gf_true);
glusterd_op_set_req (req);
ret = glusterd_op_txn_begin ();
@@ -2232,6 +2238,8 @@ glusterd_replace_brick (rpcsvc_request_t *req, dict_t *dict)
glusterd_op_set_ctx (GD_OP_REPLACE_BRICK, dict);
+ glusterd_op_set_ctx_free (GD_OP_REPLACE_BRICK, _gf_true);
+
ret = glusterd_op_txn_begin ();
return ret;
@@ -2248,6 +2256,7 @@ glusterd_remove_brick (rpcsvc_request_t *req, dict_t *dict)
glusterd_op_set_op (GD_OP_REMOVE_BRICK);
glusterd_op_set_ctx (GD_OP_REMOVE_BRICK, dict);
+ glusterd_op_set_ctx_free (GD_OP_REMOVE_BRICK, _gf_true);
glusterd_op_set_req (req);
ret = glusterd_op_txn_begin ();