From: Timothy Arceri Date: Wed, 10 Jul 2019 04:11:23 +0000 (+1000) Subject: radv: fix memory leak when restoring from cache X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ae4ccb67be29b9bca5c3ba8e5ed175901e1645b6;p=mesa.git radv: fix memory leak when restoring from cache Fixes: 726a31df705b ("radv: Add the concept of radv shader binaries.") Reviewed-by: Samuel Pitoiset --- diff --git a/src/amd/vulkan/radv_pipeline_cache.c b/src/amd/vulkan/radv_pipeline_cache.c index 2b3fda6eb8e..b773de30c32 100644 --- a/src/amd/vulkan/radv_pipeline_cache.c +++ b/src/amd/vulkan/radv_pipeline_cache.c @@ -309,6 +309,7 @@ radv_create_shader_variants_from_pipeline_cache(struct radv_device *device, p += entry->binary_sizes[i]; entry->variants[i] = radv_shader_variant_create(device, binary); + free(binary); } else if (entry->binary_sizes[i]) { p += entry->binary_sizes[i]; }