diff mbox

[08/12] Btrfs: Fix memory leak on finding existing super

Message ID 4D413086.10109@cn.fujitsu.com (mailing list archive)
State New, archived
Headers show

Commit Message

Li Zefan Jan. 27, 2011, 8:44 a.m. UTC
None
diff mbox

Patch

diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 61bd79a..f50253c 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];