radv: fix a memleak for merged shaders on GFX9
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 20 Jul 2018 16:48:07 +0000 (18:48 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 23 Jul 2018 09:34:39 +0000 (11:34 +0200)
commit6e32d9e7b0945268b844ab2397ab3c9924136d3a
treea12dacff4045981b3c6397159e4ec97473443231
parentd0ee0a0a5d5fb658c87fed82cbcf9b48437abb2c
radv: fix a memleak for merged shaders on GFX9

modules[i] can be NULL for merged shaders but we have to
free the NIR code. radv_can_dump_shader_stats() already handles
if modules[i] is NULL, no need to check it twice.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_pipeline.c