diff options
author | NIIBE Yutaka <[email protected]> | 2021-05-14 02:47:24 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2021-05-14 04:06:10 +0000 |
commit | 58b330e935b9225d5a389c5d858a0e7304f573ad (patch) | |
tree | 3bcbd87b4011a0cae963eea04edca12e1cc411d0 /scd/apdu.c | |
parent | agent: Use SHA-256 for SSH fingerprint by default (diff) | |
download | gnupg-58b330e935b9225d5a389c5d858a0e7304f573ad.tar.gz gnupg-58b330e935b9225d5a389c5d858a0e7304f573ad.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]>
Diffstat (limited to 'scd/apdu.c')
-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 ae6d8664b..62aefb8cf 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -2111,9 +2111,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); } |