]> Git Repo - linux.git/commitdiff
fuse: fix NULL deref in fuse_file_alloc()
authorDan Carpenter <[email protected]>
Mon, 26 Jan 2009 14:00:58 +0000 (15:00 +0100)
committerMiklos Szeredi <[email protected]>
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 <[email protected]>
Signed-off-by: Miklos Szeredi <[email protected]>
CC: [email protected]
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);
This page took 0.056418 seconds and 4 git commands to generate.