ALT Linux repos
Group :: System/Libraries
RPM: libusb
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: libusb-compat-usb_close.patch
Download
Download
--- libusb/core.c.orig 2008-09-21 16:10:35 +0400
+++ libusb/core.c 2008-10-01 00:58:57 +0400
@@ -626,6 +626,10 @@ API_EXPORTED usb_dev_handle *usb_open(st
API_EXPORTED int usb_close(usb_dev_handle *dev)
{
+ if(!dev) {
+ usbi_dbg("attempt to close a non-opened (NULL) USB device. This is a bug in your application");
+ return 0;
+ }
usbi_dbg("");
libusb_close(dev->handle);
free(dev);