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: Ian Kent <raven@themaw.net>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
This commit is contained in:
Ian Kent 2010-12-27 16:33:15 +08:00 committed by Li Zefan
parent 83a4d54840
commit bdc924bb4c
1 changed files with 2 additions and 0 deletions

View File

@ -654,6 +654,8 @@ static int btrfs_get_sb(struct file_system_type *fs_type, int flags,
}
btrfs_close_devices(fs_devices);
kfree(fs_info);
kfree(tree_root);
} else {
char b[BDEVNAME_SIZE];