diff options
author | Simon Ser <contact@emersion.fr> | 2023-03-16 10:39:50 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-03-26 07:19:01 +0000 |
commit | 59d2743c0cc4bb77527449fccfe1fba03357457c (patch) | |
tree | 28d7c300f7cc8c4d3487f58dd031790c11b32056 /render | |
parent | 12e28c349216deb3798ff509ff9c6044bfe4ab80 (diff) |
render/vulkan: avoid double-close on sync_file FD after semaphore import
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3610
Diffstat (limited to 'render')
-rw-r--r-- | render/vulkan/renderer.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |