提交 83afeac4 编写于 作者: J Jim Meyering 提交者: Chris Mason

Btrfs: disk-io.c (open_ctree): avoid leaks upon allocation failure

Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 0463bb4e
...@@ -1699,6 +1699,8 @@ struct btrfs_root *open_ctree(struct super_block *sb, ...@@ -1699,6 +1699,8 @@ struct btrfs_root *open_ctree(struct super_block *sb,
kfree(tree_root); kfree(tree_root);
bdi_destroy(&fs_info->bdi); bdi_destroy(&fs_info->bdi);
kfree(fs_info); kfree(fs_info);
kfree(chunk_root);
kfree(dev_root);
return ERR_PTR(err); return ERR_PTR(err);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册