Skip to content

Commit

Permalink
fuse_file_alloc(): fix NULL dereferences
Browse files Browse the repository at this point in the history
Fix obvious NULL dereferences spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Adrian Bunk authored and Linus Torvalds committed Nov 15, 2007
1 parent be21f0a commit 8744969
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/fuse/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ struct fuse_file *fuse_file_alloc(void)
if (!ff->reserved_req) {
kfree(ff);
ff = NULL;
} else {
INIT_LIST_HEAD(&ff->write_entry);
atomic_set(&ff->count, 0);
}
INIT_LIST_HEAD(&ff->write_entry);
atomic_set(&ff->count, 0);
}
return ff;
}
Expand Down

0 comments on commit 8744969

Please sign in to comment.