]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
fuse: fix NULL deref in fuse_file_alloc()
authorDan Carpenter <error27@gmail.com>
Mon, 26 Jan 2009 14:00:58 +0000 (15:00 +0100)
committerMiklos Szeredi <mszeredi@suse.de>
Mon, 26 Jan 2009 14:00:58 +0000 (15:00 +0100)
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
fs/fuse/file.c

index e8162646a9b5840766636477d1ae14f32ddc569f..d9fdb7cec5388756720374f9b4c70ec56d453bb2 100644 (file)
@@ -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);