summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2012-01-17 23:33:18 +0100
committerGravatar Nikias Bassen2012-01-17 23:33:18 +0100
commitc8622579c41022c9786439af4d1af68d54204587 (patch)
tree2ffb4ea97d44f5ae862f05d15e668fc873368c0b
parent94c2752bef5fe1c3954e6801ae3e30ed9c16165a (diff)
parent5ae8d057300a7dc9a5d567656e8b338a8989478d (diff)
downloadusbmuxd-c8622579c41022c9786439af4d1af68d54204587.tar.gz
usbmuxd-c8622579c41022c9786439af4d1af68d54204587.tar.bz2
Merge branch 'master' of http://git.sukimashita.com/usbmuxd
-rw-r--r--daemon/usb-linux.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/daemon/usb-linux.c b/daemon/usb-linux.c
index c9d4629..334d967 100644
--- a/daemon/usb-linux.c
+++ b/daemon/usb-linux.c
@@ -352,15 +352,17 @@ int usb_discover(void)
usbmuxd_log(LL_WARNING, "Endpoint type mismatch for interface %d of device %d-%d", intf->bInterfaceNumber, bus, address);
}
}
- libusb_free_config_descriptor(config);
if(j == config->bNumInterfaces) {
usbmuxd_log(LL_WARNING, "Could not find a suitable USB interface for device %d-%d", bus, address);
+ libusb_free_config_descriptor(config);
libusb_close(handle);
free(usbdev);
continue;
}
+ libusb_free_config_descriptor(config);
+
if((res = libusb_claim_interface(handle, usbdev->interface)) != 0) {
usbmuxd_log(LL_WARNING, "Could not claim interface %d for device %d-%d: %d", usbdev->interface, bus, address, res);
libusb_close(handle);