aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2016-09-02 05:45:26 +0000
committerNIIBE Yutaka <[email protected]>2016-09-02 05:45:26 +0000
commit8fe81055762d9c9e6f03fb7853a985c94ef73ac3 (patch)
tree1655ee7aabd52f17b62709bf64467aace36ff79d
parentscd: Clean up unused shutdown method. (diff)
downloadgnupg-8fe81055762d9c9e6f03fb7853a985c94ef73ac3.tar.gz
gnupg-8fe81055762d9c9e6f03fb7853a985c94ef73ac3.zip
scd: Release the card reader after card removal.
* scd/command.c (update_reader_status_file): Call apdu_close_reader. -- GnuPG-bug-id: 2651 Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to '')
-rw-r--r--scd/command.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/scd/command.c b/scd/command.c
index 239480bfa..2909330e5 100644
--- a/scd/command.c
+++ b/scd/command.c
@@ -2340,7 +2340,10 @@ update_reader_status_file (int set_card_removed_flag)
/* Set the card removed flag for all current sessions. */
if (vr->any && vr->status == 0 && set_card_removed_flag)
- update_card_removed (idx, 1);
+ {
+ apdu_close_reader (vr->slot);
+ update_card_removed (idx, 1);
+ }
vr->any = 1;