diff options
Diffstat (limited to 'libusb/os/windows_usb.c')
-rw-r--r-- | libusb/os/windows_usb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c index 8157aec..aa13654 100644 --- a/libusb/os/windows_usb.c +++ b/libusb/os/windows_usb.c @@ -1462,7 +1462,7 @@ static int windows_get_device_list(struct libusb_context *ctx, struct discovered windows_device_priv_init(dev); // Keep track of devices that need unref unref_list[unref_cur++] = dev; - if (unref_cur > unref_size) { + if (unref_cur >= unref_size) { unref_size += 64; unref_list = realloc(unref_list, unref_size*sizeof(libusb_device*)); if (unref_list == NULL) { |