From c04fe640f5a0baf146a8530cf012fe35aa9ca588 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Mon, 14 May 2012 13:21:56 +0530 Subject: cluster/replicate: check for 'loc->path' before dereferencing it Change-Id: I4dada6fd509aa289e97fdb0b50b28300a15e6a0e Signed-off-by: Amar Tumballi BUG: 820355 Reviewed-on: http://review.gluster.com/3325 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/cluster/afr/src/afr-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit