diff options
author | Adrian Bunk <bunk@kernel.org> | 2007-11-14 20:00:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-14 21:45:42 -0500 |
commit | 8744969a819de4ee5158f4cdb30104601cc015d4 (patch) | |
tree | 3320c7eac5c3e15d3b17849f5afa1c0cbf1dc863 /fs | |
parent | be21f0ab0d8f10c90265066603a8d95b6037a6fa (diff) |
fuse_file_alloc(): fix NULL dereferences
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fuse/file.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 0fcdba9d47c0..535b37399009 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c | |||
@@ -55,9 +55,10 @@ struct fuse_file *fuse_file_alloc(void) | |||
55 | if (!ff->reserved_req) { | 55 | if (!ff->reserved_req) { |
56 | kfree(ff); | 56 | kfree(ff); |
57 | ff = NULL; | 57 | ff = NULL; |
58 | } else { | ||
59 | INIT_LIST_HEAD(&ff->write_entry); | ||
60 | atomic_set(&ff->count, 0); | ||
58 | } | 61 | } |
59 | INIT_LIST_HEAD(&ff->write_entry); | ||
60 | atomic_set(&ff->count, 0); | ||
61 | } | 62 | } |
62 | return ff; | 63 | return ff; |
63 | } | 64 | } |