diff --git a/libsigrok4DSL/hardware/DSL/dscope.c b/libsigrok4DSL/hardware/DSL/dscope.c index 5f1e6732..d418eb13 100644 --- a/libsigrok4DSL/hardware/DSL/dscope.c +++ b/libsigrok4DSL/hardware/DSL/dscope.c @@ -371,6 +371,11 @@ static GSList *scan(GSList *options) } g_free(firmware); + + libusb_unref_device(device_handle); +#ifdef _WIN32 + libusb_unref_device(device_handle); +#endif sr_info("Waitting for device reconnect, name:\"%s\"", prof->model); } diff --git a/libsigrok4DSL/hardware/DSL/dslogic.c b/libsigrok4DSL/hardware/DSL/dslogic.c index de53bb94..b6e138aa 100644 --- a/libsigrok4DSL/hardware/DSL/dslogic.c +++ b/libsigrok4DSL/hardware/DSL/dslogic.c @@ -459,6 +459,11 @@ static GSList *scan(GSList *options) free(firmware); + libusb_unref_device(device_handle); +#ifdef _WIN32 + libusb_unref_device(device_handle); +#endif + sr_info("Waitting for device reconnect, name:\"%s\"", prof->model); } }