Module: Mesa Branch: master Commit: 775866478807faef626130382c86f9490e13140e URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=775866478807faef626130382c86f9490e13140e
Author: James Park <[email protected]> Date: Sat Aug 29 11:35:29 2020 -0700 radv: Only close local_fd when valid Necessary when drm_device is bypassed. Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7119> --- src/amd/vulkan/radv_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index a85242aa32c..4574465b5a7 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -466,7 +466,8 @@ radv_physical_device_destroy(struct radv_physical_device *device) radv_finish_wsi(device); device->ws->destroy(device->ws); disk_cache_destroy(device->disk_cache); - close(device->local_fd); + if (device->local_fd != -1) + close(device->local_fd); if (device->master_fd != -1) close(device->master_fd); vk_free(&device->instance->alloc, device); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
