diff options
author | Amar Tumballi <amarts@redhat.com> | 2012-05-14 13:21:56 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-05-16 15:48:54 -0700 |
commit | c04fe640f5a0baf146a8530cf012fe35aa9ca588 (patch) | |
tree | e83f480ac490fdcae4fd2b0cef2c9b7c371ec578 /xlators/cluster/afr | |
parent | cb83c85511fc7fbfe34f97baebdda9d2bb309511 (diff) |
cluster/replicate: check for 'loc->path' before dereferencing it
Change-Id: I4dada6fd509aa289e97fdb0b50b28300a15e6a0e
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 820355
Reviewed-on: http://review.gluster.com/3325
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/cluster/afr')
-rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 9b6c36fb077..171137b910d 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -2113,7 +2113,7 @@ afr_lookup (call_frame_t *frame, xlator_t *this, frame->local = local; local->fop = GF_FOP_LOOKUP; - if (!strcmp (loc->path, "/" GF_REPLICATE_TRASH_DIR)) { + if (loc->path && !strcmp (loc->path, "/" GF_REPLICATE_TRASH_DIR)) { op_errno = ENOENT; goto out; } |