mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
scd: Fix getinfo active_apps.
* scd/app.c (send_card_and_app_list): Avoid locking recursively. -- Fixes-commit: 25a140542a9186a27b7df9cd3ca3d478b59cbf1b GnuPG-bug-id: 7323 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
394a6feb22
commit
73c211889b
@ -2742,6 +2742,9 @@ send_card_and_app_list (ctrl_t ctrl, card_t wantcard, int with_apps)
|
|||||||
card_t *cardlist = NULL;
|
card_t *cardlist = NULL;
|
||||||
int n, ncardlist;
|
int n, ncardlist;
|
||||||
|
|
||||||
|
if (wantcard)
|
||||||
|
return send_serialno_and_app_status (wantcard, with_apps, ctrl);
|
||||||
|
|
||||||
card_list_r_lock ();
|
card_list_r_lock ();
|
||||||
for (n=0, c = card_top; c; c = c->next)
|
for (n=0, c = card_top; c; c = c->next)
|
||||||
n++;
|
n++;
|
||||||
@ -2766,7 +2769,6 @@ send_card_and_app_list (ctrl_t ctrl, card_t wantcard, int with_apps)
|
|||||||
|
|
||||||
if (wantcard && wantcard != card)
|
if (wantcard && wantcard != card)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
lock_card (card, ctrl);
|
lock_card (card, ctrl);
|
||||||
err = send_serialno_and_app_status (card, with_apps, ctrl);
|
err = send_serialno_and_app_status (card, with_apps, ctrl);
|
||||||
unlock_card (card);
|
unlock_card (card);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user