From ab42cb8d75985e33fb27e9fc5da0bc37c1024804 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Mon, 11 Oct 2010 00:04:57 +0000 Subject: fuse_loc_fill(): handle a case of NULL dereference Signed-off-by: Amar Tumballi Signed-off-by: Vijay Bellur BUG: 1889 (gluster FUSE client crashes on irregularity) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1889 --- xlators/mount/fuse/src/fuse-helpers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators/mount') diff --git a/xlators/mount/fuse/src/fuse-helpers.c b/xlators/mount/fuse/src/fuse-helpers.c index 7f708e0256e..96fc8a86400 100644 --- a/xlators/mount/fuse/src/fuse-helpers.c +++ b/xlators/mount/fuse/src/fuse-helpers.c @@ -221,7 +221,7 @@ fuse_loc_fill (loc_t *loc, fuse_state_t *state, ino_t ino, if (ret <= 0) { gf_log ("glusterfs-fuse", GF_LOG_DEBUG, "inode_path failed for %"PRId64"/%s", - parent->ino, name); + (parent)?parent->ino:0, name); goto fail; } loc->path = path; @@ -242,7 +242,7 @@ fuse_loc_fill (loc_t *loc, fuse_state_t *state, ino_t ino, if (ret <= 0) { gf_log ("glusterfs-fuse", GF_LOG_DEBUG, "inode_path failed for %"PRId64, - inode->ino); + (inode)?inode->ino:0); goto fail; } loc->path = path; -- cgit