Btrfs: Fix memory leak at umount
authorLi Zefan <lizf@cn.fujitsu.com>
Mon, 27 Dec 2010 08:19:53 +0000 (16:19 +0800)
committerLi Zefan <lizf@cn.fujitsu.com>
Wed, 26 Jan 2011 17:05:02 +0000 (01:05 +0800)
fs_info, which is allocated in open_ctree(), should be freed
in close_ctree().

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
fs/btrfs/disk-io.c

index a5d2249..089871e 100644 (file)
@@ -2513,6 +2513,8 @@ int close_ctree(struct btrfs_root *root)
        kfree(fs_info->chunk_root);
        kfree(fs_info->dev_root);
        kfree(fs_info->csum_root);
+       kfree(fs_info);
+
        return 0;
 }