diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-10-11 01:20:37 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-11 11:14:14 -0700 |
commit | 41716c7c21b15e7ecf14f0caf1eef3980707fb74 (patch) | |
tree | 622cd9c92a31969681ef2c0cd865147dfa495933 /fs/jbd | |
parent | 7e491092e442b3f8c0d90d470b398fdb74703ec7 (diff) | |
download | op-kernel-dev-41716c7c21b15e7ecf14f0caf1eef3980707fb74.zip op-kernel-dev-41716c7c21b15e7ecf14f0caf1eef3980707fb74.tar.gz |
[PATCH] null dereference in fs/jbd/journal.c
Since commit d1807793e1e7e502e3dc047115e9dbc3b50e4534 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>
Diffstat (limited to 'fs/jbd')
-rw-r--r-- | fs/jbd/journal.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c index c518dd8..b85c686 100644 --- a/fs/jbd/journal.c +++ b/fs/jbd/journal.c @@ -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; } |