From 009d2de88f7f4327b19aaa4d514c805b124db2f6 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Thu, 18 May 2023 10:46:54 -0700 Subject: [PATCH] nir_opt_constant_folding: Fix nir_deref_path leak Cc: Mesa-stable Reviewed-by: Alyssa Rosenzweig Part-of: --- src/compiler/nir/nir_opt_constant_folding.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/nir/nir_opt_constant_folding.c b/src/compiler/nir/nir_opt_constant_folding.c index dd91fed65c5..4b27bc36081 100644 --- a/src/compiler/nir/nir_opt_constant_folding.c +++ b/src/compiler/nir/nir_opt_constant_folding.c @@ -167,6 +167,7 @@ const_value_for_deref(nir_deref_instr *deref) /* We have to have ended at a vector */ assert(c->num_elements == 0); + nir_deref_path_finish(&path); return v ? v : c->values; fail: