From: Michael Gernoth Date: Thu, 10 Apr 2008 20:31:10 +0000 (+0200) Subject: release usb-device on close X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver/commitdiff_plain/74ed4fbde86ab4aaa5e3480d66b510b771c7bd1e?ds=inline;hp=adb51cf1e775445a863fc2cc25dc9c6f408fbffb release usb-device on close --- diff --git a/usb-driver.c b/usb-driver.c index 942cdc1..1162d51 100644 --- a/usb-driver.c +++ b/usb-driver.c @@ -858,8 +858,10 @@ int close(int fd) { if (fd == windrvrfd && windrvrfd >= 0) { DPRINTF("close windrvrfd\n"); - if (usb_devhandle) + if (usb_devhandle) { + usb_claim(0); usb_close(usb_devhandle); + } usb_devhandle = NULL; usbinterface = -1;