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>
This commit is contained in:
Hans de Goede
2013-09-06 16:40:51 +02:00
parent 5f366718c4
commit d758af27bb
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -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);
+1 -1
View File
@@ -1 +1 @@
#define LIBUSB_NANO 10830
#define LIBUSB_NANO 10832