aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_queue.c
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2020-01-06 16:38:19 +0200
committerLionel Landwerlin <[email protected]>2020-01-08 18:20:50 +0200
commit4578d4ae524ad433933e077bce6a0b85643e3f25 (patch)
tree940bfc8cb5d7599ead2a5f11c692cd739903fc4d /src/intel/vulkan/anv_queue.c
parent7d33203b446cdfa11c2aaea18caf05b120a16283 (diff)
anv: don't close invalid syncfd semaphore
Signed-off-by: Lionel Landwerlin <[email protected]> Cc: <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_queue.c')
-rw-r--r--src/intel/vulkan/anv_queue.c3
1 files changed, 2 insertions, 1 deletions
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: