From: Jim Meyering Date: Wed, 1 Oct 2008 23:09:04 +0000 (-0400) Subject: Btrfs: disk-io.c (open_ctree): Don't deref. NULL upon failed kzalloc X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=0463bb4e8d2f717a9bf3be6cc12c0aec51cc261d;p=deliverable%2Flinux.git Btrfs: disk-io.c (open_ctree): Don't deref. NULL upon failed kzalloc Signed-off-by: Chris Mason --- 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, 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; }