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

Since commit d1807793e1 we dereference a NULL
pointer.  Coverity id #1432.  We set journal to NULL, and use it directly
afterwards.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Eric Sesterhenn 2006-10-11 01:20:37 -07:00 committed by Linus Torvalds
parent 7e491092e4
commit 41716c7c21
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}