Btrfs: disk-io.c (open_ctree): Don't deref. NULL upon failed kzalloc
authorJim Meyering <meyering@redhat.com>
Wed, 1 Oct 2008 23:09:04 +0000 (19:09 -0400)
committerChris Mason <chris.mason@oracle.com>
Wed, 1 Oct 2008 23:09:04 +0000 (19:09 -0400)
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/disk-io.c

index 5ee10d3136f5af287ab43b2c6294a896cfe6abc0..41b7d24d07e28d5cc80b634a328dbbb726f3a177 100644 (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;
        }