From bd51538d285ad0ef488df60e24eaa08b9da20c28 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 22 Jan 2020 08:40:11 +0100 Subject: [PATCH] radv: fix double free corruption in radv_alloc_memory() If the driver fails to allocate memory for some reasons, it shouldn't free the 'mem' object twice. Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2302 Fixes: 825ddfee599 ("radv: Handle device memory alloc failure with normal free.") Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Tested-by: Marge Bot Part-of: --- src/amd/vulkan/radv_device.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index c3ff31668aa..2b222d331a3 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -5063,7 +5063,6 @@ static VkResult radv_alloc_memory(struct radv_device *device, fail: radv_free_memory(device, pAllocator,mem); - vk_free2(&device->alloc, pAllocator, mem); return result; } -- 2.30.2