提交 41716c7c 编写于 作者: E Eric Sesterhenn 提交者: Linus Torvalds

[PATCH] null dereference in fs/jbd/journal.c

Since commit d1807793 we dereference a NULL
pointer.  Coverity id #1432.  We set journal to NULL, and use it directly
afterwards.
Signed-off-by: NEric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 7e491092
......@@ -725,6 +725,7 @@ journal_t * journal_init_dev(struct block_device *bdev,
__FUNCTION__);
kfree(journal);
journal = NULL;
goto out;
}
journal->j_dev = bdev;
journal->j_fs_dev = fs_dev;
......@@ -735,7 +736,7 @@ journal_t * journal_init_dev(struct block_device *bdev,
J_ASSERT(bh != NULL);
journal->j_sb_buffer = bh;
journal->j_superblock = (journal_superblock_t *)bh->b_data;
out:
return journal;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册