diff options
author | Jim Meyering <meyering@redhat.com> | 2008-10-01 19:09:04 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-10-01 19:09:04 -0400 |
commit | 0463bb4e8d2f717a9bf3be6cc12c0aec51cc261d (patch) | |
tree | 08d4cfb8e0ddbada2399e2d4477fdf29b2521cd3 /fs/btrfs/disk-io.c | |
parent | 75ccf47d13bfb66de7faf596bfe497b9af7aaa40 (diff) |
Btrfs: disk-io.c (open_ctree): Don't deref. NULL upon failed kzalloc
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 5ee10d3136f5..41b7d24d07e2 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -1371,7 +1371,8 @@ struct btrfs_root *open_ctree(struct super_block *sb, | |||
1371 | 1371 | ||
1372 | struct btrfs_super_block *disk_super; | 1372 | struct btrfs_super_block *disk_super; |
1373 | 1373 | ||
1374 | if (!extent_root || !tree_root || !fs_info) { | 1374 | if (!extent_root || !tree_root || !fs_info || |
1375 | !chunk_root || !dev_root) { | ||
1375 | err = -ENOMEM; | 1376 | err = -ENOMEM; |
1376 | goto fail; | 1377 | goto fail; |
1377 | } | 1378 | } |