From 48672d26a01f3ce443479b19820e2822a6c650f6 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Fri, 8 Oct 2010 00:25:30 +0000 Subject: check if fd is NULL before accessing it in fuse_open_resume Signed-off-by: Raghavendra Bhat Signed-off-by: Vijay Bellur BUG: 1858 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1858 --- xlators/mount/fuse/src/fuse-bridge.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'xlators/mount') diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index e5fce1a40cb..6578710ea07 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; -- cgit