* [2.6 patch] fuse_file_alloc(): fix NULL dereferences
@ 2007-10-19 14:05 Adrian Bunk
2007-10-19 14:14 ` Miklos Szeredi
0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2007-10-19 14:05 UTC (permalink / raw)
To: miklos; +Cc: fuse-devel, linux-kernel
This patch fixes obvious NULL dereferences spotted by the Coverity
checker.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
---
53b7c67ef9b6c26a0c7f554fef43021633a48ab7
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 0fcdba9..535b373 100644
--- 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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [2.6 patch] fuse_file_alloc(): fix NULL dereferences
2007-10-19 14:05 [2.6 patch] fuse_file_alloc(): fix NULL dereferences Adrian Bunk
@ 2007-10-19 14:14 ` Miklos Szeredi
0 siblings, 0 replies; 2+ messages in thread
From: Miklos Szeredi @ 2007-10-19 14:14 UTC (permalink / raw)
To: bunk; +Cc: fuse-devel, linux-kernel
> This patch fixes obvious NULL dereferences spotted by the Coverity
> checker.
Thanks!
Miklos
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-10-19 14:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-19 14:05 [2.6 patch] fuse_file_alloc(): fix NULL dereferences Adrian Bunk
2007-10-19 14:14 ` Miklos Szeredi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.