mirror of
https://github.com/RPCS3/hidapi.git
synced 2026-07-19 13:34:37 -04:00
f0a4a1fa2e
In case if libusb_detach_kernel_driver fails inside hidapi_initialize_device HIDAPI had tried to `libusb_close(dev->device_handle)` two times: - right after `libusb_detach_kernel_driver`; - outside of `hidapi_initialize_device` function; The fix: `libusb_close` the device only once. And since `hidapi_initialize_device` is not responsible for opening the device - it is not responsible for closing it either.