diff options
author | NIIBE Yutaka <[email protected]> | 2021-05-14 02:47:24 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2021-05-14 02:47:24 +0000 |
commit | 6fdb9b35467cd35cd62179615940f51ba5dc02d1 (patch) | |
tree | d2ef6aefbac409ce90d66045bbce92fb9e99e701 | |
parent | scd: Release the context for pcsc_thred. (diff) | |
download | gnupg-6fdb9b35467cd35cd62179615940f51ba5dc02d1.tar.gz gnupg-6fdb9b35467cd35cd62179615940f51ba5dc02d1.zip |
scd: Remove wrong assertion and add protection to PCSC.COUNT.
* scd/apdu.c (apdu_dev_list_finish): Fix for calling
release_pcsc_context.
Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r-- | scd/apdu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scd/apdu.c b/scd/apdu.c index fa3a89c34..027b5055f 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -2189,9 +2189,10 @@ apdu_dev_list_finish (struct dev_list *dl) for (i = 0; i < MAX_READER; i++) pcsc.rdrname[i] = NULL; - log_assert (pcsc.count > 0); + npth_mutex_lock (&reader_table_lock); if (pcsc.count == 0) release_pcsc_context (); + npth_mutex_unlock (&reader_table_lock); } xfree (dl); } |