diff --git a/src/intel/vulkan/anv_queue.c b/src/intel/vulkan/anv_queue.c index fdf10f2c012..9a38ca85c9e 100644 --- a/src/intel/vulkan/anv_queue.c +++ b/src/intel/vulkan/anv_queue.c @@ -1915,7 +1915,8 @@ VkResult anv_ImportFenceFdKHR( * * If the import fails, we leave the file descriptor open. */ - close(fd); + if (fd != -1) + close(fd); if (pImportFenceFdInfo->flags & VK_FENCE_IMPORT_TEMPORARY_BIT) { anv_fence_impl_cleanup(device, &fence->temporary);