summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorarao <arao@redhat.com>2015-02-12 10:12:35 +0530
committerVijay Bellur <vbellur@redhat.com>2015-03-15 08:45:44 -0700
commitd8c18855caa07ff9d529395a760457281dd2f08e (patch)
tree17980d585b304f37dbe8e8463e6dfbaefedb67ce /xlators
parent510b1f6292da249a641aea6bc06ede433cc66936 (diff)
fuse: Fixing dereference after null check
CID: 1124496 The pointer is not checked against null and is dereferenced anyway, which is now checked. Change-Id: Ib810546445596671b3656f01a14bbad02cdc221c BUG: 789278 Signed-off-by: arao <arao@redhat.com> Reviewed-on: http://review.gluster.org/9640 Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mount/fuse/src/fuse-helpers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/mount/fuse/src/fuse-helpers.c b/xlators/mount/fuse/src/fuse-helpers.c
index d30f2e8a282..3bfdbcaf17c 100644
--- a/xlators/mount/fuse/src/fuse-helpers.c
+++ b/xlators/mount/fuse/src/fuse-helpers.c
@@ -390,7 +390,7 @@ fuse_loc_fill (loc_t *loc, fuse_state_t *state, ino_t ino,
}
inode = loc->inode;
- if (!inode) {
+ if (!inode && parent) {
inode = inode_grep (parent->table, parent, name);
loc->inode = inode;
}