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:
Alan Ott
2010-10-23 13:27:44 -04:00
parent 3a3ac5e084
commit ebadfd6d5b
-2
View File
@@ -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;
}