From ec46d27eaaefa803f1e813e43fc447225006b5c6 Mon Sep 17 00:00:00 2001 From: dreamsourcelabTAI Date: Wed, 21 Jun 2023 10:26:39 +0800 Subject: [PATCH] fix: Can't open the old version device on windows --- libsigrok4DSL/hardware/DSL/dscope.c | 5 +++++ libsigrok4DSL/hardware/DSL/dslogic.c | 5 +++++ 2 files changed, 10 insertions(+) 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); } }