Skip to content

Commit

Permalink
fuse: fix NULL deref in fuse_file_alloc()
Browse files Browse the repository at this point in the history
ff is set to NULL and then dereferenced on line 65.  Compile tested only.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: stable@kernel.org
  • Loading branch information
Dan Carpenter authored and Miklos Szeredi committed Jan 26, 2009
1 parent f3b8436 commit bb875b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/fuse/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct fuse_file *fuse_file_alloc(struct fuse_conn *fc)
ff->reserved_req = fuse_request_alloc();
if (!ff->reserved_req) {
kfree(ff);
ff = NULL;
return NULL;
} else {
INIT_LIST_HEAD(&ff->write_entry);
atomic_set(&ff->count, 0);
Expand Down

0 comments on commit bb875b3

Please sign in to comment.