mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 12:40:23 +01:00
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: 825ddfee59 ("radv: Handle device memory alloc failure with normal free.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3508>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3508>
This commit is contained in:
parent
5a6a88f58c
commit
bd51538d28
1 changed files with 0 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue