radv: fix memory leak in radv_rt_nir_to_asm

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 26.0
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 574f577657)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
This commit is contained in:
Rhys Perry 2026-03-20 16:06:48 +00:00 committed by Eric Engestrom
parent 99129b13ce
commit ad17b864cb
2 changed files with 2 additions and 1 deletions

View file

@ -884,7 +884,7 @@
"description": "radv: fix memory leak in radv_rt_nir_to_asm",
"nominated": true,
"nomination_type": 4,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -541,6 +541,7 @@ radv_rt_nir_to_asm(struct radv_device *device, struct vk_pipeline_cache *cache,
if (dump_shader)
simple_mtx_unlock(&instance->shader_dump_mtx);
ralloc_free(mem_ctx);
free(binary);
*out_shader = shader;