glsl/uniform_initializer_tests: Fix memory leak
authorEric Anholt <eric@anholt.net>
Fri, 4 Dec 2020 21:19:32 +0000 (13:19 -0800)
committerMarge Bot <eric+marge@anholt.net>
Tue, 15 Dec 2020 19:39:29 +0000 (19:39 +0000)
Needed for meson test with asan enabled.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7936>

src/compiler/glsl/tests/set_uniform_initializer_tests.cpp

index dfb7235..282c9b4 100644 (file)
@@ -86,6 +86,9 @@ set_uniform_initializer::TearDown()
    ralloc_free(this->mem_ctx);
    this->mem_ctx = NULL;
 
+   if (this->prog->UniformHash)
+      string_to_uint_map_dtor(this->prog->UniformHash);
+
    ralloc_free(this->prog);
    this->prog = NULL;