mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 08:58:02 +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>
(cherry picked from commit 0bc65b1d81)
This commit is contained in:
parent
bc26f1c4ee
commit
c2cbbefe49
2 changed files with 4 additions and 2 deletions
|
|
@ -481,7 +481,7 @@
|
|||
"description": "v3dv: fix leak",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2488,8 +2488,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