diff options
author | Eric Engestrom <[email protected]> | 2020-03-10 18:54:41 +0100 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-10 22:43:25 +0000 |
commit | 1fa259b035c000b590a91a5b51412a2ff1972ab0 (patch) | |
tree | 6465993afe173dbd6a7933e12d31101f98fc43ca /src/vulkan/wsi | |
parent | 6e035c01fb95686b9c48f2930104b90c7d12f0f7 (diff) |
vulkan/wsi: fix cleanup when dup() fails
Fixes: f5433e4d6ce247b86dae ("vulkan/wsi: Add modifiers support to wsi_create_native_image")
Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4137>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4137>
Diffstat (limited to 'src/vulkan/wsi')
-rw-r--r-- | src/vulkan/wsi/wsi_common.c | 2 |
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; |