From: Dan Carpenter Date: Mon, 26 Jan 2009 14:00:58 +0000 (+0100) Subject: fuse: fix NULL deref in fuse_file_alloc() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bb875b38dc5e343bdb696b2eab8233e4d195e208;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Miklos Szeredi CC: stable@kernel.org --- diff --git a/fs/fuse/file.c b/fs/fuse/file.c index e8162646a9b5..d9fdb7cec538 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -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);