render/vulkan: avoid double-close on sync_file FD after semaphore import

Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3610
Simon Ser 2 years ago
parent 12e28c3492
commit 59d2743c0c

@ -840,8 +840,8 @@ static bool vulkan_sync_foreign_texture(struct wlr_vk_texture *texture) {
.fd = sync_file_fd, .fd = sync_file_fd,
}; };
res = renderer->dev->api.importSemaphoreFdKHR(renderer->dev->dev, &import_info); res = renderer->dev->api.importSemaphoreFdKHR(renderer->dev->dev, &import_info);
close(sync_file_fd);
if (res != VK_SUCCESS) { if (res != VK_SUCCESS) {
close(sync_file_fd);
wlr_vk_error("vkImportSemaphoreFdKHR", res); wlr_vk_error("vkImportSemaphoreFdKHR", res);
return false; return false;
} }

Loading…
Cancel
Save