Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8744969a819de4ee5158f4cdb30104601cc015d4
Commit:     8744969a819de4ee5158f4cdb30104601cc015d4
Parent:     be21f0ab0d8f10c90265066603a8d95b6037a6fa
Author:     Adrian Bunk <[EMAIL PROTECTED]>
AuthorDate: Wed Nov 14 17:00:02 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Nov 14 18:45:42 2007 -0800

    fuse_file_alloc(): fix NULL dereferences
    
    Fix obvious NULL dereferences spotted by the Coverity checker.
    
    Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>
    Acked-by: Miklos Szeredi <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 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 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;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to