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:43:01 -0800
commitd516bed538bc09a77f94292de4bb4861da6ace54 (patch)
tree269d0e48d5307fa438b69d62b55ffb916e6aa6f4 /glusterfsd
parentb47f741b5f42d2e7d994cd06e1c1c679fd9e9535 (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. > Backport of http://review.gluster.org/#/c/13262/ > Change-Id: If383017a61f09275256e51c44a1efa28feace87b > BUG: 1300152 > Signed-off-by: Sakshi <sabansal@redhat.com> Change-Id: If383017a61f09275256e51c44a1efa28feace87b BUG: 1302962 Signed-off-by: Sakshi <sabansal@redhat.com> Reviewed-on: http://review.gluster.org/13317 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> 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 c1ab934d31f..877adba2938 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;
}