From d5a9607598cf02e50bce306cffe97990a50129c0 Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Sat, 28 Mar 2015 21:09:57 +0530 Subject: glusterd : fix memory overrun for opinfo.local_xaction_peers Due to incorrect sizeof local_xaction_peers was not allocated as intended which lead a memory overrun in gf_free while freeing local_xaction_peers. Change-Id: Ie4d63289aae51727eea091bce0e6cb0a496ce7cf BUG: 1204727 Signed-off-by: Atin Mukherjee Reviewed-on: http://review.gluster.org/10032 Tested-by: Gluster Build System Reviewed-by: Emmanuel Dreyfus Tested-by: Emmanuel Dreyfus Reviewed-by: Krishnan Parthasarathi Tested-by: Krishnan Parthasarathi --- xlators/mgmt/glusterd/src/glusterd-handler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/mgmt/glusterd/src') diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index 52143bb3fb8..62fc0e6f053 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -626,7 +626,7 @@ glusterd_op_txn_begin (rpcsvc_request_t *req, glusterd_op_t op, void *ctx, local_locking_done: txn_op_info.local_xaction_peers = - GF_CALLOC (1, sizeof (struct cds_list_head *), + GF_CALLOC (1, sizeof (struct cds_list_head), gf_common_mt_list_head_t); if (!txn_op_info.local_xaction_peers) { ret = -1; -- cgit