Commit 6c1a4cb4 authored by Uwe Hermann's avatar Uwe Hermann

sysclk-lwla: Fix a segfault in dev_close().

parent 56c8dd82
...@@ -301,7 +301,8 @@ static int dev_close(struct sr_dev_inst *sdi) ...@@ -301,7 +301,8 @@ static int dev_close(struct sr_dev_inst *sdi)
if (ret != SR_OK) if (ret != SR_OK)
sr_warn("Unable to shut down device."); sr_warn("Unable to shut down device.");
libusb_release_interface(usb->devhdl, USB_INTERFACE); if (usb->devhdl)
libusb_release_interface(usb->devhdl, USB_INTERFACE);
sr_usb_close(usb); sr_usb_close(usb);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment