scd: Internal CCID driver: Fix a failure path.

* scd/ccid-driver.c (ccid_open_usb_reader): On error, call
libusb_release_interface.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2020-09-28 15:55:44 +09:00
parent b1e8072320
commit d561c936a2
1 changed files with 1 additions and 0 deletions

View File

@ -1727,6 +1727,7 @@ ccid_open_usb_reader (const char *spec_reader_name,
{
--ccid_usb_thread_is_alive;
free (rid);
libusb_release_interface (idev, ifc_no);
libusb_close (idev);
free (*handle);
*handle = NULL;