aboutsummaryrefslogtreecommitdiffstats
path: root/scd/app.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2019-08-21 00:57:52 +0000
committerNIIBE Yutaka <[email protected]>2019-08-21 03:01:21 +0000
commit09d000babb71990ef1b3f42017a67516bb994388 (patch)
tree3614b7dc47f0443c3e2ef036699e6e906e3c8bd1 /scd/app.c
parentscd: Fix switching to another APP. (diff)
downloadgnupg-09d000babb71990ef1b3f42017a67516bb994388.tar.gz
gnupg-09d000babb71990ef1b3f42017a67516bb994388.zip
scd: Fix resetting CARD_CTX.
* scd/app.c (deallocate_card): Don't call scd_clear_current_app. (card_reset): Reset ctrl->current_apptype. * scd/command.c (open_card_with_request): Likewise. (send_client_notifications): Likewise. (scd_clear_current_app): Remove. -- It's too late to call scd_clear_current_app from deallocate_card, because CARD_CTX is already reset. Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'scd/app.c')
-rw-r--r--scd/app.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/scd/app.c b/scd/app.c
index edd3174dc..40a711c5e 100644
--- a/scd/app.c
+++ b/scd/app.c
@@ -339,6 +339,7 @@ card_reset (card_t card, ctrl_t ctrl, int send_reset)
else
{
ctrl->card_ctx = NULL;
+ ctrl->current_apptype = APPTYPE_NONE;
card_unref (card);
}
@@ -814,8 +815,6 @@ deallocate_card (card_t card)
xfree (a);
}
- scd_clear_current_app (card);
-
xfree (card->serialno);
unlock_card (card);
xfree (card);