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:

committed by
Marge Bot

parent
1951065a16
commit
0bc65b1d81
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user