summaryrefslogtreecommitdiffstats
path: root/glusterfsd
diff options
context:
space:
mode:
authorSakshi Bansal <sabansal@redhat.com>2016-01-20 09:31:00 +0530
committerRaghavendra G <rgowdapp@redhat.com>2016-02-15 18:40:22 -0800
commit888efdf5e0ab7d22c3fc227dc0dbfaec91b1d5d9 (patch)
tree98abf4cd30101d50d7b93a5071bedadd76185133 /glusterfsd
parent5858b2b1b568f253dbee818d4017f4c0fb642ae4 (diff)
glusterfsd: destroy frame after rebalance callback has completed
Rebalance after sending a status notification immediately destroys the frame. Now in its callback the frame is corrupted. Rebalance crashes when this corrupted frame is accessed. To avoid this we must destroy the frame after the callback is completed. Change-Id: If383017a61f09275256e51c44a1efa28feace87b BUG: 1300152 Signed-off-by: Sakshi <sabansal@redhat.com> Reviewed-on: http://review.gluster.org/13262 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'glusterfsd')
-rw-r--r--glusterfsd/src/glusterfsd-mgmt.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index 609567a3c4c..f7882723b1b 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -1834,6 +1834,11 @@ glusterfs_rebalance_event_notify_cbk (struct rpc_req *req, struct iovec *iov,
}
out:
free (rsp.dict.dict_val); //malloced by xdr
+
+ if (frame) {
+ STACK_DESTROY (frame->root);
+ }
+
return ret;
}
@@ -1870,9 +1875,6 @@ glusterfs_rebalance_event_notify (dict_t *dict)
GF_FREE (req.dict.dict_val);
- if (frame) {
- STACK_DESTROY (frame->root);
- }
return ret;
}