summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorIan Kent <raven@themaw.net>2010-12-27 16:33:15 +0800
committerLi Zefan <lizf@cn.fujitsu.com>2011-01-27 01:05:07 +0800
commitbdc924bb4cdac92b945945c3149ab8191c92d75d (patch)
tree906e0ae44bff82d3bdc03efbf5e42144b5e941ac /fs/btrfs/super.c
parent83a4d54840c88a4a45c49670f044b8c7ddeaa8c7 (diff)
downloadtalos-op-linux-bdc924bb4cdac92b945945c3149ab8191c92d75d.tar.gz
talos-op-linux-bdc924bb4cdac92b945945c3149ab8191c92d75d.zip
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>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c2
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,
}
btrfs_close_devices(fs_devices);
+ kfree(fs_info);
+ kfree(tree_root);
} else {
char b[BDEVNAME_SIZE];
OpenPOWER on IntegriCloud