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