Hi, is this supposed to crash, when you don't free a list? for(i = 0; i < 100; i++) { cnt = libusb_get_device_list(NULL, &devs); if (cnt < 0) return (int) cnt; //if (i < 99) //libusb_free_device_list(devs, 1); }
It crashes btw only, if I have a Cherry keyboard attached: Device Descriptor: bcdUSB: 0x0200 bDeviceClass: 0x00 bDeviceSubClass: 0x00 bDeviceProtocol: 0x00 bMaxPacketSize0: 0x08 (8) idVendor: 0x046A (Cherry GMBH) idProduct: 0x0011 bcdDevice: 0x0100 iManufacturer: 0x00 iProduct: 0x00 iSerialNumber: 0x00 bNumConfigurations: 0x01 ConnectionStatus: DeviceConnected Current Config Value: 0x01 Device Bus Speed: Low Device Address: 0x01 Open Pipes: 1 Endpoint Descriptor: bEndpointAddress: 0x81 Transfer Type: Interrupt wMaxPacketSize: 0x0008 (8) bInterval: 0x0A Configuration Descriptor: wTotalLength: 0x0022 bNumInterfaces: 0x01 bConfigurationValue: 0x01 iConfiguration: 0x00 bmAttributes: 0xA0 (Bus Powered Remote Wakeup) MaxPower: 0x32 (100 Ma) Interface Descriptor: bInterfaceNumber: 0x00 bAlternateSetting: 0x00 bNumEndpoints: 0x01 bInterfaceClass: 0x03 (HID) bInterfaceSubClass: 0x01 bInterfaceProtocol: 0x01 iInterface: 0x00 HID Descriptor: bcdHID: 0x0111 bCountryCode: 0x00 bNumDescriptors: 0x01 bDescriptorType: 0x22 wDescriptorLength: 0x0040 Endpoint Descriptor: bEndpointAddress: 0x81 Transfer Type: Interrupt wMaxPacketSize: 0x0008 (8) bInterval: 0x0A Best regards Stefano ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_nov _______________________________________________ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel