mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
v3dv: fix leak
Cc: mesa-stable Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17201>
This commit is contained in:
parent
1951065a16
commit
0bc65b1d81
1 changed files with 3 additions and 1 deletions
|
|
@ -2533,8 +2533,10 @@ v3dv_CreateBuffer(VkDevice _device,
|
|||
|
||||
/* Limit allocations to 32-bit */
|
||||
const VkDeviceSize aligned_size = align64(buffer->size, buffer->alignment);
|
||||
if (aligned_size > UINT32_MAX || aligned_size < buffer->size)
|
||||
if (aligned_size > UINT32_MAX || aligned_size < buffer->size) {
|
||||
vk_free(&device->vk.alloc, buffer);
|
||||
return VK_ERROR_OUT_OF_DEVICE_MEMORY;
|
||||
}
|
||||
|
||||
*pBuffer = v3dv_buffer_to_handle(buffer);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue