Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=46a39c1cd5d2f804b27e9a4be3fb1b510dda9570
Commit:     46a39c1cd5d2f804b27e9a4be3fb1b510dda9570
Parent:     6915719b36a97d28fab576c6fa2a20364b435fe6
Author:     Eric Sandeen <[EMAIL PROTECTED]>
AuthorDate: Thu Jan 17 15:21:09 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu Jan 17 15:38:58 2008 -0800

    hfs: fix coverity-found null deref
    
    Fix potential null deref introduced by commit
    cf0594625083111ae522496dc1c256f7476939c2
    http://bugzilla.kernel.org/show_bug.cgi?id=9748
    
    Signed-off-by: Eric Sandeen <[EMAIL PROTECTED]>
    Cc: Roman Zippel <[EMAIL PROTECTED]>
    Reported-by: Adrian Bunk <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/hfs/btree.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/fs/hfs/btree.c b/fs/hfs/btree.c
index 31284c7..110dd35 100644
--- a/fs/hfs/btree.c
+++ b/fs/hfs/btree.c
@@ -61,7 +61,7 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 
id, btree_keycmp ke
        mapping = tree->inode->i_mapping;
        page = read_mapping_page(mapping, 0, NULL);
        if (IS_ERR(page))
-               goto free_tree;
+               goto free_inode;
 
        /* Load the header */
        head = (struct hfs_btree_header_rec *)(kmap(page) + sizeof(struct 
hfs_bnode_desc));
@@ -99,11 +99,12 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, 
u32 id, btree_keycmp ke
        page_cache_release(page);
        return tree;
 
- fail_page:
+fail_page:
        page_cache_release(page);
- free_tree:
+free_inode:
        tree->inode->i_mapping->a_ops = &hfs_aops;
        iput(tree->inode);
+free_tree:
        kfree(tree);
        return NULL;
 }
-
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