zink: free all ntv allocations after creating shader module

these are all fairly large sources of leaks

Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5887>
This commit is contained in:
Mike Blumenkrantz 2020-06-03 11:41:43 -04:00 committed by Marge Bot
parent adc4f3896a
commit 2b343238a1

View file

@ -305,6 +305,9 @@ zink_compile_nir(struct zink_screen *screen, struct nir_shader *nir,
if (vkCreateShaderModule(screen->dev, &smci, NULL, &ret->shader_module) != VK_SUCCESS)
return NULL;
free(spirv->words);
free(spirv);
return ret;
}