From 8ab7cb15f1b92ebf720e88fd811df63d63a0ed4f Mon Sep 17 00:00:00 2001 From: vmallika Date: Thu, 16 Jul 2015 19:24:00 +0530 Subject: [PATCH 264/279] posix: fix mem-leak in posix xattrop > Change-Id: I1dd70f74a98c5875eb316f3c3e560047f128685b > BUG: 1243890 > Signed-off-by: vmallika > Reviewed-on: http://review.gluster.org/11700 > Tested-by: NetBSD Build System > Tested-by: Gluster Build System > Reviewed-by: Pranith Kumar Karampuri Change-Id: I8966d2778af4d7a1083ed84e28ecd5d4382305de BUG: 1243886 Signed-off-by: vmallika Reviewed-on: https://code.engineering.redhat.com/gerrit/53207 Reviewed-by: Raghavendra Gowdappa Tested-by: Raghavendra Gowdappa --- xlators/storage/posix/src/posix.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index 3f4af01..535e5ff 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -4971,11 +4971,13 @@ unlock: array = NULL; } - array = NULL; - out: if (op_ret < 0) filler->op_errno = op_errno; + + if (array) + GF_FREE (array); + return op_ret; } -- 1.7.1