summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-10-01 23:09:51 (GMT)
committerChris Mason <chris.mason@oracle.com>2008-10-01 23:09:51 (GMT)
commit83afeac42c5680b0b70d64fb8c4724cf05483fc2 (patch)
treea81261351ae676ed02f86760c07ed73a63709c8f
parent0463bb4e8d2f717a9bf3be6cc12c0aec51cc261d (diff)
downloadlinux-83afeac42c5680b0b70d64fb8c4724cf05483fc2.tar.xz
Btrfs: disk-io.c (open_ctree): avoid leaks upon allocation failure
Signed-off-by: Chris Mason <chris.mason@oracle.com>
-rw-r--r--fs/btrfs/disk-io.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 41b7d24..0be044b 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -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);
}