diff options
-rw-r--r-- | usb_device.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usb_device.c b/usb_device.c index b23b2045..b3c966cc 100644 --- a/usb_device.c +++ b/usb_device.c @@ -381,8 +381,11 @@ struct usb_device *usb_device_free(struct usb_device *device) { struct usb_device *next = device->next; - if (device->handle != NULL) + if (device->handle != NULL) { + libusb_release_interface(device->handle, + device->interface_descriptor->bInterfaceNumber); libusb_close(device->handle); + } /* * This unref balances the ref added in the add_device function. |