1
0
Fork 0

Btrfs: disk-io.c (open_ctree): Don't deref. NULL upon failed kzalloc

Signed-off-by: Chris Mason <chris.mason@oracle.com>
hifive-unleashed-5.1
Jim Meyering 2008-10-01 19:09:04 -04:00 committed by Chris Mason
parent 75ccf47d13
commit 0463bb4e8d
1 changed files with 2 additions and 1 deletions

View File

@ -1371,7 +1371,8 @@ struct btrfs_root *open_ctree(struct super_block *sb,
struct btrfs_super_block *disk_super;
if (!extent_root || !tree_root || !fs_info) {
if (!extent_root || !tree_root || !fs_info ||
!chunk_root || !dev_root) {
err = -ENOMEM;
goto fail;
}