aboutsummaryrefslogtreecommitdiffstats
path: root/src/vulkan/wsi
diff options
context:
space:
mode:
Diffstat (limited to 'src/vulkan/wsi')
-rw-r--r--src/vulkan/wsi/wsi_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c
index 8d6654cb47d..d629ea339ac 100644
--- a/src/vulkan/wsi/wsi_common.c
+++ b/src/vulkan/wsi/wsi_common.c
@@ -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;