From: Mike Blumenkrantz Date: Wed, 3 Jun 2020 15:41:43 +0000 (-0400) Subject: zink: free all ntv allocations after creating shader module X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2b343238a1fc2954d10770082ff873a28efafee2;p=mesa.git zink: free all ntv allocations after creating shader module these are all fairly large sources of leaks Reviewed-by: Antonio Caggiano Reviewed-by: Erik Faye-Lund Part-of: --- diff --git a/src/gallium/drivers/zink/zink_compiler.c b/src/gallium/drivers/zink/zink_compiler.c index 9b084d2a15c..a17bc19432e 100644 --- a/src/gallium/drivers/zink/zink_compiler.c +++ b/src/gallium/drivers/zink/zink_compiler.c @@ -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; }