From 59d2743c0cc4bb77527449fccfe1fba03357457c Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 16 Mar 2023 10:39:50 +0100 Subject: render/vulkan: avoid double-close on sync_file FD after semaphore import Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3610 --- render/vulkan/renderer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/render/vulkan/renderer.c b/render/vulkan/renderer.c index 667301f9..0b99a6a4 100644 --- a/render/vulkan/renderer.c +++ b/render/vulkan/renderer.c @@ -840,8 +840,8 @@ static bool vulkan_sync_foreign_texture(struct wlr_vk_texture *texture) { .fd = sync_file_fd, }; res = renderer->dev->api.importSemaphoreFdKHR(renderer->dev->dev, &import_info); - close(sync_file_fd); if (res != VK_SUCCESS) { + close(sync_file_fd); wlr_vk_error("vkImportSemaphoreFdKHR", res); return false; } -- cgit v1.2.3