diff options
author | NIIBE Yutaka <[email protected]> | 2020-11-05 07:10:49 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2020-11-05 07:10:49 +0000 |
commit | f808012ac2cf67ec563da178d963f300a7f2564d (patch) | |
tree | 4e3c80c293f1f02a017078a38e5d98a213451f7a /scd/apdu.c | |
parent | scd: Internal CCID driver: Fix a race condition on close. (diff) | |
download | gnupg-f808012ac2cf67ec563da178d963f300a7f2564d.tar.gz gnupg-f808012ac2cf67ec563da178d963f300a7f2564d.zip |
scd: Use lock_slot for apdu_send_direct.
* scd/apdu.c (apdu_send_direct): Use lock_slot.
--
With trylock_slot, it may return SW_HOST_BUSY. This may occur when
apdu_get_status is called by scd_update_reader_status_file.
Simply using lock_slot is much easier for user of apdu_send_direct.
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'scd/apdu.c')
-rw-r--r-- | scd/apdu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scd/apdu.c b/scd/apdu.c index a29305556..8a3b5b411 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -3248,7 +3248,7 @@ apdu_send_direct (int slot, size_t extended_length, } #undef SHORT_RESULT_BUFFER_SIZE - if ((sw = trylock_slot (slot))) + if ((sw = lock_slot (slot))) { xfree (apdu_buffer); xfree (result_buffer); |