Mesa (master): gallium/ntt: Fix leak of the per-instr liveness information.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jan 12 20:03:35 UTC 2021


Module: Mesa
Branch: master
Commit: 0367bdbdc465d4568733099dae9f2cc2e3eb2021
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0367bdbdc465d4568733099dae9f2cc2e3eb2021

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jan 11 10:40:21 2021 -0800

gallium/ntt: Fix leak of the per-instr liveness information.

Fixes: 34cc6a804ec9 ("gallium: Add a nir-to-TGSI pass.")
Reviewed-by: Adam Jackson <ajax at redhat.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8422>

---

 src/gallium/auxiliary/nir/nir_to_tgsi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/auxiliary/nir/nir_to_tgsi.c b/src/gallium/auxiliary/nir/nir_to_tgsi.c
index 540e4be236b..5b3760ea059 100644
--- a/src/gallium/auxiliary/nir/nir_to_tgsi.c
+++ b/src/gallium/auxiliary/nir/nir_to_tgsi.c
@@ -2193,6 +2193,9 @@ ntt_emit_impl(struct ntt_compile *c, nir_function_impl *impl)
 
    ntt_setup_registers(c, &impl->registers);
    ntt_emit_cf_list(c, &impl->body);
+
+   ralloc_free(c->liveness);
+   c->liveness = NULL;
 }
 
 static int



More information about the mesa-commit mailing list