btrfs-progs: Fix an extent buffer leak in qgroups check

Qgroup verify codes will read fs root to check if the subvolume exists.
But it forgot to free the extent buffer read out, only freeing the
memory.

Fix it by also freeing the extent buffers.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Qu Wenruo 2016-04-18 10:27:08 +08:00 committed by David Sterba
parent f172bd2b8d
commit 90a60f178d
1 changed files with 1 additions and 1 deletions

View File

@ -761,7 +761,7 @@ static int load_quota_info(struct btrfs_fs_info *info)
tmproot = btrfs_read_fs_root_no_cache(info, &root_key);
if (tmproot && !IS_ERR(tmproot)) {
count->subvol_exists = 1;
free(tmproot);
btrfs_free_fs_root(tmproot);
}
}