Btrfs: disk-io.c (open_ctree): avoid leaks upon allocation failure
authorJim Meyering <meyering@redhat.com>
Wed, 1 Oct 2008 23:09:51 +0000 (19:09 -0400)
committerChris Mason <chris.mason@oracle.com>
Wed, 1 Oct 2008 23:09:51 +0000 (19:09 -0400)
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/disk-io.c

index 41b7d24d07e28d5cc80b634a328dbbb726f3a177..0be044bb619499a8d588b4c2735bd1c402e9d79f 100644 (file)
@@ -1699,6 +1699,8 @@ fail:
        kfree(tree_root);
        bdi_destroy(&fs_info->bdi);
        kfree(fs_info);
+       kfree(chunk_root);
+       kfree(dev_root);
        return ERR_PTR(err);
 }