summaryrefslogtreecommitdiff
path: root/qgroup-verify.c
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2016-04-18 10:27:08 +0800
committerDavid Sterba <dsterba@suse.com>2016-05-02 14:42:32 +0200
commit90a60f178d90baff648973b2c7a4873b4c7efd08 (patch)
treebcb95d38e1e75f93c5c02e33e6660febceccf4ef /qgroup-verify.c
parentf172bd2b8db3b078f5fb515a772b7e59fea43c8f (diff)
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>
Diffstat (limited to 'qgroup-verify.c')
-rw-r--r--qgroup-verify.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qgroup-verify.c b/qgroup-verify.c
index c4e9201e..48e4d22e 100644
--- a/qgroup-verify.c
+++ b/qgroup-verify.c
@@ -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);
}
}