Skip to content

Commit bb875b3

Browse files
error27Miklos Szeredi
authored andcommitted
fuse: fix NULL deref in fuse_file_alloc()
ff is set to NULL and then dereferenced on line 65. Compile tested only. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Miklos Szeredi <[email protected]> CC: [email protected]
1 parent f3b8436 commit bb875b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/fuse/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ struct fuse_file *fuse_file_alloc(struct fuse_conn *fc)
5454
ff->reserved_req = fuse_request_alloc();
5555
if (!ff->reserved_req) {
5656
kfree(ff);
57-
ff = NULL;
57+
return NULL;
5858
} else {
5959
INIT_LIST_HEAD(&ff->write_entry);
6060
atomic_set(&ff->count, 0);

0 commit comments

Comments
 (0)