util/vma: Fix leak of the heap in the unit test.

Needed for unit testing with asan enabled.

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7936>
This commit is contained in:
Eric Anholt 2020-12-04 11:17:39 -08:00 committed by Marge Bot
parent e640a9ca79
commit 867e7f7cf4

View file

@ -78,6 +78,11 @@ struct random_test {
util_vma_heap_init(&heap, MEM_START_PAGE * MEM_PAGE_SIZE, MEM_SIZE);
}
~random_test()
{
util_vma_heap_finish(&heap);
}
void test(unsigned long count)
{
std::uniform_int_distribution<> one_to_thousand(1, 1000);