From dd66de6017096d9f54f224b252fecb137f93263c Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 5 Nov 2021 13:30:44 +0100 Subject: [PATCH] radv: remove never reached free() when compiling shaders binary_out is never NULL and binaries are freed from the pipeline after they are added to the cache. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: --- src/amd/vulkan/radv_shader.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index 9f6c786d65b..432c70bdd99 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -1846,11 +1846,7 @@ shader_compile(struct radv_device *device, struct vk_shader_module *module, /* Copy the shader binary configuration to store it in the cache. */ memcpy(&binary->config, &shader->config, sizeof(binary->config)); - if (binary_out) - *binary_out = binary; - else - free(binary); - + *binary_out = binary; return shader; }