From 2b343238a1fc2954d10770082ff873a28efafee2 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 3 Jun 2020 11:41:43 -0400 Subject: [PATCH] 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: --- src/gallium/drivers/zink/zink_compiler.c | 3 +++ 1 file changed, 3 insertions(+) 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; } -- 2.30.2