diff options
author | Hans de Goede <hdegoede@redhat.com> | 2013-09-06 16:40:51 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2013-09-06 16:41:02 +0200 |
commit | d758af27bb4a75d242a230cea39f952d16d07ee3 (patch) | |
tree | b25534e3a7167be069d54c5a5dfc504c4bf5e856 | |
parent | 5f366718c468231a4b233e437a8b3854c72f3310 (diff) | |
download | libusb-d758af27bb4a75d242a230cea39f952d16d07ee3.tar.gz |
openbsd: Fix usbi_sanitize_device error handling
If usbi_sanitize_device fails we need to continue from the beginning of
the loop, rather then going on with the device we've just free-ed.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r-- | libusb/os/openbsd_usb.c | 4 | ||||
-rw-r--r-- | libusb/version_nano.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/libusb/os/openbsd_usb.c b/libusb/os/openbsd_usb.c index 2997e53..84c339e 100644 --- a/libusb/os/openbsd_usb.c +++ b/libusb/os/openbsd_usb.c @@ -215,8 +215,10 @@ obsd_get_device_list(struct libusb_context * ctx, continue; } - if (usbi_sanitize_device(dev)) + if (usbi_sanitize_device(dev)) { libusb_unref_device(dev); + continue; + } } ddd = discovered_devs_append(*discdevs, dev); diff --git a/libusb/version_nano.h b/libusb/version_nano.h index dfa5664..1aa4bd5 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 10830 +#define LIBUSB_NANO 10832 |