nir_opt_constant_folding: Fix nir_deref_path leak

Cc: Mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23173>
(cherry picked from commit 009d2de88f)
This commit is contained in:
Jesse Natalie 2023-05-18 10:46:54 -07:00 committed by Eric Engestrom
parent 09a04dda8c
commit 00ecfc8690
2 changed files with 2 additions and 1 deletions

View file

@ -1894,7 +1894,7 @@
"description": "nir_opt_constant_folding: Fix nir_deref_path leak",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -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: