Fixes: f5433e4d6ce247b86dae ("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>
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;