提交 bdc924bb 编写于 作者: I Ian Kent 提交者: Li Zefan

Btrfs: Fix memory leak on finding existing super

We missed a memory deallocation in commit 450ba0ea.

If an existing super block is found at mount and there is no
error condition then the pre-allocated tree_root and fs_info
are no not used and are not freeded.
Signed-off-by: NIan Kent <raven@themaw.net>
Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
上级 83a4d548
...@@ -654,6 +654,8 @@ static int btrfs_get_sb(struct file_system_type *fs_type, int flags, ...@@ -654,6 +654,8 @@ static int btrfs_get_sb(struct file_system_type *fs_type, int flags,
} }
btrfs_close_devices(fs_devices); btrfs_close_devices(fs_devices);
kfree(fs_info);
kfree(tree_root);
} else { } else {
char b[BDEVNAME_SIZE]; char b[BDEVNAME_SIZE];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册