diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2011-04-14 03:45:20 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-04-14 03:38:29 -0700 |
commit | 6c16974a0ed485c72f84922fcf67b76ac8f64358 (patch) | |
tree | 526e20ece8cd4833a49530d29f841a0893fdba76 /xlators/cluster/afr | |
parent | 1c5706c43d17beb2dd8eb78c5b740bafd5b05506 (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/cluster/afr')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-entry.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c index a5c7109e5cd..88bf2448d15 100644 --- a/xlators/cluster/afr/src/afr-self-heal-entry.c +++ b/xlators/cluster/afr/src/afr-self-heal-entry.c @@ -617,7 +617,6 @@ afr_sh_entry_expunge_purge (call_frame_t *expunge_frame, xlator_t *this, return 0; } - int afr_sh_entry_expunge_entry_cbk (call_frame_t *expunge_frame, void *cookie, xlator_t *this, @@ -643,6 +642,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) && @@ -672,6 +673,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", |