diff --git a/src/scpi/scpi_usbtmc_libusb.c b/src/scpi/scpi_usbtmc_libusb.c index caf17e7e..b7892436 100644 --- a/src/scpi/scpi_usbtmc_libusb.c +++ b/src/scpi/scpi_usbtmc_libusb.c @@ -554,8 +554,7 @@ static int scpi_usbtmc_libusb_close(void *priv) uscpi->detached_kernel_driver = 0; } - libusb_close(usb->devhdl); - usb->devhdl = NULL; + sr_usb_close(usb); return SR_OK; }