mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
vulkan/wsi: fix cleanup when dup() fails
Fixes: f5433e4d6c ("vulkan/wsi: Add modifiers support to wsi_create_native_image")
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4137>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4137>
This commit is contained in:
parent
6e035c01fb
commit
1fa259b035
1 changed files with 1 additions and 1 deletions
|
|
@ -620,7 +620,7 @@ wsi_create_native_image(const struct wsi_swapchain *chain,
|
|||
image->fds[p] = dup(fd);
|
||||
if (image->fds[p] == -1) {
|
||||
for (uint32_t i = 0; i < p; i++)
|
||||
close(image->fds[p]);
|
||||
close(image->fds[i]);
|
||||
|
||||
result = VK_ERROR_OUT_OF_HOST_MEMORY;
|
||||
goto fail;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue