From 4578d4ae524ad433933e077bce6a0b85643e3f25 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Mon, 6 Jan 2020 16:38:19 +0200 Subject: [PATCH] anv: don't close invalid syncfd semaphore MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Lionel Landwerlin Cc: Reviewed-by: Tapani Pälli Reviewed-by: Jason Ekstrand --- src/intel/vulkan/anv_queue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_queue.c b/src/intel/vulkan/anv_queue.c index 76fc93fde37..40f1dc7c5fd 100644 --- a/src/intel/vulkan/anv_queue.c +++ b/src/intel/vulkan/anv_queue.c @@ -1847,7 +1847,8 @@ anv_semaphore_impl_cleanup(struct anv_device *device, break; case ANV_SEMAPHORE_TYPE_SYNC_FILE: - close(impl->fd); + if (impl->fd >= 0) + close(impl->fd); break; case ANV_SEMAPHORE_TYPE_TIMELINE: -- 2.30.2