Merge pull request #13740 from JoshuaVandaele/bsod-fix-i-hope
Host: Clean up device handle in all cases
This commit is contained in:
commit
5eb61024c6
|
@ -78,8 +78,8 @@ std::string USBHost::GetDeviceNameFromVIDPID(u16 vid, u16 pid)
|
||||||
libusb_get_string_descriptor_ascii(handle, desc.iProduct, buffer, sizeof(buffer)) > 0)
|
libusb_get_string_descriptor_ascii(handle, desc.iProduct, buffer, sizeof(buffer)) > 0)
|
||||||
{
|
{
|
||||||
device_name = reinterpret_cast<char*>(buffer);
|
device_name = reinterpret_cast<char*>(buffer);
|
||||||
libusb_close(handle);
|
|
||||||
}
|
}
|
||||||
|
libusb_close(handle);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue