From 30693dfb6fe970dba195bf00a77d854e6fbc1ed0 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Mon, 28 Sep 2020 15:55:44 +0900 Subject: [PATCH] scd: Internal CCID driver: Fix a failure path. * scd/ccid-driver.c (ccid_open_usb_reader): On error, call libusb_release_interface. -- Backport master commit of: d561c936a217627bc29aac628a8d01f7003dcd28 Signed-off-by: NIIBE Yutaka --- scd/ccid-driver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c index c76695061..0ff3dc902 100644 --- a/scd/ccid-driver.c +++ b/scd/ccid-driver.c @@ -1739,6 +1739,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;