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
committerPranith Kumar Karampuri <pkarampu@redhat.com>2014-09-23 23:16:37 -0700
commit3b871bee4a0ad3bc8b393ba23bfcf3ad6886cf42 (patch)
treefed481c0d5075c9329c0468f71b089e5d5983cd9 /xlators/cluster/afr/src/afr-self-heal-data.c
parent6e8ad12fbac943336f9eb8d97bf2e0bedb9fb225 (diff)
cluster/afr: Fixed mem leaks in self-heal code path.
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: I3c727ff4bb323dccb81da4b3168ac69bb340d17d BUG: 1145471 Signed-off-by: Anuradha <atalur@redhat.com> Reviewed-on: http://review.gluster.org/8821 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.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);