From 888efdf5e0ab7d22c3fc227dc0dbfaec91b1d5d9 Mon Sep 17 00:00:00 2001 From: Sakshi Bansal Date: Wed, 20 Jan 2016 09:31:00 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/13262 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Raghavendra G --- glusterfsd/src/glusterfsd-mgmt.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'glusterfsd') 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; } -- cgit