anv: don't close invalid syncfd semaphore

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Lionel Landwerlin
2020-01-06 16:38:19 +02:00
parent 7d33203b44
commit 4578d4ae52
+2 -1
View File
@@ -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: