mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
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 <gniibe@fsij.org>
This commit is contained in:
parent
607713e3dd
commit
6fdb9b3546
@ -2189,9 +2189,10 @@ apdu_dev_list_finish (struct dev_list *dl)
|
|||||||
for (i = 0; i < MAX_READER; i++)
|
for (i = 0; i < MAX_READER; i++)
|
||||||
pcsc.rdrname[i] = NULL;
|
pcsc.rdrname[i] = NULL;
|
||||||
|
|
||||||
log_assert (pcsc.count > 0);
|
npth_mutex_lock (&reader_table_lock);
|
||||||
if (pcsc.count == 0)
|
if (pcsc.count == 0)
|
||||||
release_pcsc_context ();
|
release_pcsc_context ();
|
||||||
|
npth_mutex_unlock (&reader_table_lock);
|
||||||
}
|
}
|
||||||
xfree (dl);
|
xfree (dl);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user