Skip to content

Commit

Permalink
Btrfs: disk-io.c (open_ctree): Don't deref. NULL upon failed kzalloc
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Jim Meyering authored and Chris Mason committed Oct 1, 2008
1 parent 75ccf47 commit 0463bb4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0463bb4

Please sign in to comment.