projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be21f0a
)
fuse_file_alloc(): fix NULL dereferences
author
Adrian Bunk
<bunk@kernel.org>
Thu, 15 Nov 2007 01:00:02 +0000
(17:00 -0800)
committer
Linus Torvalds
<torvalds@woody.linux-foundation.org>
Thu, 15 Nov 2007 02:45:42 +0000
(18:45 -0800)
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>
fs/fuse/file.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/fuse/file.c
b/fs/fuse/file.c
index 0fcdba9d47c090ba5b6dae59abfdc41897d5b7f1..535b37399009128df2413d3b7632160390113b9c 100644
(file)
--- a/
fs/fuse/file.c
+++ b/
fs/fuse/file.c
@@
-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;
}