summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2011-04-14 04:00:32 +0000
committerAnand Avati <avati@gluster.com>2011-04-14 03:38:39 -0700
commit3f94c4384a7f76bae2fc240ee4bf27ab0952c829 (patch)
tree835c5c582389e79bdd6215f02fca29af1ab5846c /xlators
parent2eba6dac3f290b6b98a722111c4c7eefd6561416 (diff)
cluster/afr: Avoid null dereference
Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2750 ([glusterfs-3.2.0qa11]: nfs server crashed in afr_sh_entry_expunge_cbk) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2750
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-entry.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c
index 2fac06a5283..4a06019f7fd 100644
--- a/xlators/cluster/afr/src/afr-self-heal-entry.c
+++ b/xlators/cluster/afr/src/afr-self-heal-entry.c
@@ -639,6 +639,8 @@ afr_sh_entry_expunge_entry_cbk (call_frame_t *expunge_frame, void *cookie,
if (op_ret == -1 && op_errno == ENOENT)
need_expunge = 1;
+ else if (op_ret == -1)
+ goto out;
if (!uuid_is_null (expunge_sh->entrybuf.ia_gfid) &&
!uuid_is_null (buf->ia_gfid) &&
@@ -668,6 +670,7 @@ afr_sh_entry_expunge_entry_cbk (call_frame_t *expunge_frame, void *cookie,
return 0;
}
+out:
if (op_ret == 0) {
gf_log (this->name, GF_LOG_TRACE,
"%s exists under %s",