Module: Mesa
Branch: master
Commit: 4578d4ae524ad433933e077bce6a0b85643e3f25
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4578d4ae524ad433933e077bce6a0b85643e3f25

Author: Lionel Landwerlin <[email protected]>
Date:   Mon Jan  6 16:38:19 2020 +0200

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]>

---

 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:

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to