From c89cb610f51e7a5df5c4b7e9378a7ac8ac513e46 Mon Sep 17 00:00:00 2001 From: Krutika Dhananjay Date: Sat, 3 Dec 2016 09:09:15 +0530 Subject: afr, client: More mem-leak fixes in COMPOUND fop cbk Bugs found and fixed: 1. Use correct subvolume index in pre-op-writev compound cbk 2. Prevent use-after-free of local->compound_args members in compound fops cbk in protocol/client 3. Fix xdata and xattr leaks in client_process_response 4. Fix possible leak of xdata in client_pre_writev() in test mode. 5. Free req->compound_req_array.compound_req_array_val as well after freeing its members 6. Free tmp_rsp->flock.lk_owner.lk_owner_val in LK fop. Change-Id: I15b646d7d4e0e5cd4ea3d2d6452c815cf2eaf68f BUG: 1401218 Signed-off-by: Krutika Dhananjay Reviewed-on: http://review.gluster.org/16020 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Pranith Kumar Karampuri CentOS-regression: Gluster Build System --- xlators/protocol/client/src/client-rpc-fops.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'xlators/protocol/client/src/client-rpc-fops.c') diff --git a/xlators/protocol/client/src/client-rpc-fops.c b/xlators/protocol/client/src/client-rpc-fops.c index 602de947d9f..0ae5659fb97 100644 --- a/xlators/protocol/client/src/client-rpc-fops.c +++ b/xlators/protocol/client/src/client-rpc-fops.c @@ -3209,7 +3209,6 @@ out: PC_MSG_REMOTE_OP_FAILED, "remote operation failed"); } - CLIENT_STACK_UNWIND (compound, frame, rsp.op_ret, gf_error_to_errno (rsp.op_errno), args_cbk, xdata); @@ -4340,7 +4339,7 @@ client3_3_writev (call_frame_t *frame, xlator_t *this, void *data) conf = this->private; ret = client_pre_writev (this, &req, args->fd, args->size, - args->offset, args->flags, args->xdata); + args->offset, args->flags, &args->xdata); if (ret) { op_errno = -ret; -- cgit