Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37560159
en ru br
ALT Linux repos
S:1.0.26-alt2
5.0: 1.0-alt2
4.1: 0.1.12-alt1.M41.1
4.0: 0.1.12-alt1.M40.1
3.0: 0.1.10a-alt3

Group :: System/Libraries
RPM: libusb

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: libusb-compat-usb_close.patch
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);
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin