From 90a60f178d90baff648973b2c7a4873b4c7efd08 Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Mon, 18 Apr 2016 10:27:08 +0800 Subject: 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 Signed-off-by: David Sterba --- qgroup-verify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } } -- cgit v1.2.3