Commit 65852349 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] fix possible NULL pointer in fs/ext3/super.c.

From: "Luiz Fernando N. Capitulino" <lcapitulino@prefeitura.sp.gov.br>

In fs/ext3/super.c::ext3_get_journal() at line 1675 `journal' can be NULL,
but it is not handled right (detect by Coverity's checker).

Signed-off by: Luiz Capitulino <lcapitulino@prefeitura.sp.gov.br>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9b82900a
...@@ -1643,6 +1643,7 @@ static journal_t *ext3_get_journal(struct super_block *sb, int journal_inum) ...@@ -1643,6 +1643,7 @@ static journal_t *ext3_get_journal(struct super_block *sb, int journal_inum)
if (!journal) { if (!journal) {
printk(KERN_ERR "EXT3-fs: Could not load journal inode\n"); printk(KERN_ERR "EXT3-fs: Could not load journal inode\n");
iput(journal_inode); iput(journal_inode);
return NULL;
} }
journal->j_private = sb; journal->j_private = sb;
ext3_init_journal_params(EXT3_SB(sb), journal); ext3_init_journal_params(EXT3_SB(sb), journal);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment