summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-10-11 00:04:57 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-10-11 03:32:58 -0700
commitab42cb8d75985e33fb27e9fc5da0bc37c1024804 (patch)
tree0f510e990c13f6c56f7d9ab52c00e4fa14b2e788
parent74dabe95193a0bc76c3ba149431a9110149a8e9e (diff)
fuse_loc_fill(): handle a case of NULL dereference
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1889 (gluster FUSE client crashes on irregularity) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1889
-rw-r--r--xlators/mount/fuse/src/fuse-helpers.c4
1 files changed, 2 insertions, 2 deletions
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;