Filipe Manana 0a0dead4ad btrfs: fix ulist leaks in error paths of qgroup self tests
[ Upstream commit d37de92b38932d40e4a251e876cc388f9aee5f42 ]

In the test_no_shared_qgroup() and test_multiple_refs() qgroup self tests,
if we fail to add the tree ref, remove the extent item or remove the
extent ref, we are returning from the test function without freeing the
"old_roots" ulist that was allocated by the previous calls to
btrfs_find_all_roots(). Fix that by calling ulist_free() before returning.

Fixes: 442244c96332 ("btrfs: qgroup: Switch self test to extent-oriented qgroup mechanism.")
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-11-10 18:14:19 +01:00
..
2020-10-16 11:11:22 -07:00
2021-09-18 13:40:15 +02:00
2020-09-10 14:03:31 -07:00
2022-06-09 10:21:16 +02:00
2020-08-04 21:02:38 -04:00
2020-10-23 11:33:41 -07:00
2020-10-23 11:33:41 -07:00
2020-08-27 16:06:47 -04:00
2020-07-31 08:16:01 +02:00