From: Daniel Elstner Date: Sat, 5 Dec 2015 09:41:16 +0000 (+0100) Subject: sysclk-lwla: Close USB handle on drain error X-Git-Tag: libsigrok-0.4.0~68 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=fc6cbfce2ba3f7f15f79acd6754ec6745e091ae6;p=libsigrok.git sysclk-lwla: Close USB handle on drain error --- diff --git a/src/hardware/sysclk-lwla/api.c b/src/hardware/sysclk-lwla/api.c index 6ba18a28..89106256 100644 --- a/src/hardware/sysclk-lwla/api.c +++ b/src/hardware/sysclk-lwla/api.c @@ -325,8 +325,10 @@ static int dev_open(struct sr_dev_inst *sdi) } ret = drain_usb(usb, EP_REPLY); - if (ret != SR_OK) + if (ret != SR_OK) { + sr_usb_close(usb); return ret; + } sdi->status = SR_ST_ACTIVE;