mirror of
https://github.com/linux-msm/openocd.git
synced 2026-02-25 13:15:07 -08:00
jtag/drivers/ti_icdi: do not segfault when adapter can't be opened
Change-Id: Id3af8dfd18b13947bca4f3c89c2516ccbcef60b6 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2742 Tested-by: jenkins
This commit is contained in:
@@ -654,6 +654,9 @@ static int icdi_usb_close(void *handle)
|
||||
{
|
||||
struct icdi_usb_handle_s *h = handle;
|
||||
|
||||
if (!h)
|
||||
return ERROR_OK;
|
||||
|
||||
if (h->usb_dev)
|
||||
libusb_close(h->usb_dev);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user