summaryrefslogtreecommitdiffstats
path: root/xlators/mount
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2010-10-08 00:25:30 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-10-12 00:23:16 -0700
commit48672d26a01f3ce443479b19820e2822a6c650f6 (patch)
tree6018c6ba145d588cbd3607d99d105b6f8640fb7e /xlators/mount
parentfab78b45f7e99ea2e41a4ef3603a56e9eac5b776 (diff)
check if fd is NULL before accessing it in fuse_open_resume
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1858 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1858
Diffstat (limited to 'xlators/mount')
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index e5fce1a40..6578710ea 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -1590,6 +1590,14 @@ fuse_open_resume (fuse_state_t *state)
fd_t *fd = NULL;
fd = fd_create (state->loc.inode, state->finh->pid);
+ if (!fd) {
+ gf_log ("fuse", GF_LOG_ERROR,
+ "fd is NULL");
+ send_fuse_err (state->this, state->finh, ENOENT);
+ free_fuse_state (state);
+ return;
+ }
+
state->fd = fd;
fd->flags = state->flags;