projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e640a9c
)
util/vma: Fix leak of the heap in the unit test.
author
Eric Anholt
<eric@anholt.net>
Fri, 4 Dec 2020 19:17:39 +0000
(11:17 -0800)
committer
Marge Bot
<eric+marge@anholt.net>
Tue, 15 Dec 2020 19:39:29 +0000
(19:39 +0000)
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>
src/util/tests/vma/vma_random_test.cpp
patch
|
blob
|
history
diff --git
a/src/util/tests/vma/vma_random_test.cpp
b/src/util/tests/vma/vma_random_test.cpp
index
9246176
..
44f25e4
100644
(file)
--- a/
src/util/tests/vma/vma_random_test.cpp
+++ b/
src/util/tests/vma/vma_random_test.cpp
@@
-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);