mirror of
https://github.com/RPCS3/hidapi.git
synced 2026-07-21 00:45:21 -04:00
Re-activated the cleanup code in read_thread(). For some unknown reason in
the past, I thought it would be a good idea to move this to hid_close(), but I can't now understand why, as freeing these objects in read_thread() makes sense because they are created in read_thread(). This code never made it into hid_close(), so it's now re-activated in read_thread(). Reported-by: Ludovic Rousseau <ludovic.rousseau@gmail.com>
This commit is contained in:
@@ -513,11 +513,9 @@ static void *read_thread(void *param)
|
||||
if no transfers are pending, but that's OK. */
|
||||
libusb_cancel_transfer(dev->transfer);
|
||||
|
||||
#if 0 // This is done in hid_close()
|
||||
/* Cleanup before returning */
|
||||
free(dev->transfer->buffer);
|
||||
libusb_free_transfer(dev->transfer);
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user