From 06c2bed16ecf38b314f5f7fce3a4459778989f03 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Thu, 12 Aug 2010 06:16:32 +0000 Subject: cluster/afr: Avoid Null de-reference when post parent is NULL Signed-off-by: Pranith Kumar K Signed-off-by: Anand V. Avati BUG: 857 (Crash in afr_sh_entry_expunge_entry_cbk) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=857 --- xlators/cluster/afr/src/afr-self-heal-entry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c index 17c82d565..a6e67641c 100644 --- a/xlators/cluster/afr/src/afr-self-heal-entry.c +++ b/xlators/cluster/afr/src/afr-self-heal-entry.c @@ -875,7 +875,7 @@ afr_sh_entry_expunge_entry_cbk (call_frame_t *expunge_frame, void *cookie, active_src = expunge_sh->active_source; source = (long) cookie; - if (op_ret == -1 && op_errno == ENOENT) { + if (op_ret == -1 && op_errno == ENOENT && postparent) { gf_log (this->name, GF_LOG_TRACE, "missing entry %s on %s", -- cgit