diff options
author | Ian Kent <raven@themaw.net> | 2010-12-27 03:33:15 -0500 |
---|---|---|
committer | Li Zefan <lizf@cn.fujitsu.com> | 2011-01-26 12:05:07 -0500 |
commit | bdc924bb4cdac92b945945c3149ab8191c92d75d (patch) | |
tree | 906e0ae44bff82d3bdc03efbf5e42144b5e941ac | |
parent | 83a4d54840c88a4a45c49670f044b8c7ddeaa8c7 (diff) |
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>
-rw-r--r-- | fs/btrfs/super.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 61bd79abb805..f50253c2279d 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -654,6 +654,8 @@ static int btrfs_get_sb(struct file_system_type *fs_type, int flags, | |||
654 | } | 654 | } |
655 | 655 | ||
656 | btrfs_close_devices(fs_devices); | 656 | btrfs_close_devices(fs_devices); |
657 | kfree(fs_info); | ||
658 | kfree(tree_root); | ||
657 | } else { | 659 | } else { |
658 | char b[BDEVNAME_SIZE]; | 660 | char b[BDEVNAME_SIZE]; |
659 | 661 | ||