summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvmallika <vmallika@redhat.com>2015-07-29 16:37:13 +0530
committerRaghavendra Bhat <raghavendra@redhat.com>2015-08-20 00:26:28 -0700
commit620403b48a021593883f39dec3a1d6bc16c53517 (patch)
tree82884a9180a446ce9984cc5081d60b74aff0ee19
parent21643f8427be22ab7e512acf6c6368eb8af1ec9d (diff)
posix: fix mem-leak in posix xattrop
This is a backport of http://review.gluster.org/#/c/11700/ > Change-Id: I1dd70f74a98c5875eb316f3c3e560047f128685b > BUG: 1243890 > Signed-off-by: vmallika <vmallika@redhat.com> > Reviewed-on: http://review.gluster.org/11700 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Change-Id: Ia192342f01330f8b2c7a520a7cc749471af7d85f BUG: 1247970 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11794 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
-rw-r--r--xlators/storage/posix/src/posix.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index f39fbd433bc..84d063ab153 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -4538,9 +4538,10 @@ unlock:
array = NULL;
}
- array = NULL;
-
out:
+ if (array)
+ GF_FREE (array);
+
return op_ret;
}