mirror of
https://github.com/RPCS3/hidapi.git
synced 2026-07-21 00:45:21 -04:00
536bad201e
Make buffer pointer NULL, once it is freed. In hid_close() buffer pointer is freed and next to that the libusb_free_transfer function is called which checks for if the LIBUSB_TRANSFER_FREE_BUFFER flag is set and the buffer pointer is not NULL. when this condition evaluates true, it tries to free memory for a buffer which is already free and a crash occurs. Even though the described behavior should not happen as per libusb documentation, it has been observed with some version(s) of libusb.