summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2014-07-08 16:42:02 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2014-07-14 09:29:19 -0700
commit7c74e9c24a06c7ae8f29c4980ea8bffecb01a2c9 (patch)
tree06f4ba68badb348a521978dc9a2e239f4966da7b
parent8d8abc19b0500b725f92164c096b64b3c37cd6b0 (diff)
cluster/afr: Fix dirent leak
afr does itransform by taking the list of entries given by client xlator to separate list but doesn't free that list. Change-Id: Ibb4d38b4934b2bb924385c88f9d7942fad933cb9 BUG: 1117243 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/8261 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com>
-rw-r--r--xlators/cluster/afr/src/afr-dir-read.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c
index fa1da3958df..41f5e60032d 100644
--- a/xlators/cluster/afr/src/afr-dir-read.c
+++ b/xlators/cluster/afr/src/afr-dir-read.c
@@ -322,6 +322,8 @@ afr_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
AFR_STACK_UNWIND (readdir, frame, op_ret, op_errno, &entries, xdata);
+ gf_dirent_free (&entries);
+
return 0;
}