summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-data.c
diff options
context:
space:
mode:
authorAnuradha <atalur@redhat.com>2014-09-23 18:24:09 +0530
committerVijay Bellur <vbellur@redhat.com>2014-09-24 03:48:20 -0700
commita8fe2d3f41c66131dd11dd506b4068ff9fb68db1 (patch)
tree46481c372f06553fca94132a971ba046b64c8a95 /xlators/cluster/afr/src/afr-self-heal-data.c
parent1f6e992f1aaa676be5bd47d17e58f1171825cf43 (diff)
cluster/afr: Fixed mem leaks in self-heal code path.
backport of: http://review.gluster.org/8821 AFR_STACK_RESET previously didn't cleanup afr_local_t, leading to memory leaks. With this patch, cleanup is done. All credit goes to Pranith Kumar Karampuri. Change-Id: I26506dfd9273b917eff5127c3e0cf9421e60f228 BUG: 1145914 Reviewed-on: http://review.gluster.org/8831 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-data.c')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-data.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c
index bee7682a23b..25e310fd2a3 100644
--- a/xlators/cluster/afr/src/afr-self-heal-data.c
+++ b/xlators/cluster/afr/src/afr-self-heal-data.c
@@ -176,6 +176,8 @@ __afr_selfheal_data_read_write (call_frame_t *frame, xlator_t *this, fd_t *fd,
healed_sinks[i] = 0;
}
}
+ if (iovec)
+ GF_FREE (iovec);
if (iobref)
iobref_unref (iobref);