summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-11-24 06:07:16 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-11-24 05:23:00 -0800
commit4a43031ce0f045b673a50159dce5316bcae825ee (patch)
tree92733373d6c68c0ba87568f36732d93f716f5675 /xlators
parent6adfd865588bdcf5ea67e8bde61dce131d18108c (diff)
cluster/afr: Fix double-free in opendir self-heal callback.
local->cont.opendir.checksum was being free'd both in the self-heal completion function and self-heal unwind. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 249 (Self heal of a file that does not exist on the first subvolume) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=249
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/afr/src/afr-dir-read.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c
index cff86cf9003..ac0663ad971 100644
--- a/xlators/cluster/afr/src/afr-dir-read.c
+++ b/xlators/cluster/afr/src/afr-dir-read.c
@@ -59,7 +59,10 @@ afr_examine_dir_completion_cbk (call_frame_t *frame, xlator_t *this)
afr_set_opendir_done (this, local->fd->inode, 1);
- AFR_STACK_UNWIND (opendir, sh->orig_frame, local->op_ret,
+ /* let self-heal's local cleanup free this */
+ local->cont.opendir.checksum = NULL;
+
+ AFR_STACK_UNWIND (opendir, frame, local->op_ret,
local->op_errno, local->fd);
return 0;