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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user