1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

Fixed card removal problems

This commit is contained in:
Werner Koch 2006-03-01 11:05:47 +00:00
parent d59f87e94b
commit 89824e5d59
6 changed files with 203 additions and 137 deletions

View file

@ -165,13 +165,17 @@ application_notify_card_removed (int slot)
return;
/* Deallocate a saved application for that slot, so that we won't
try to reuse it. */
if (lock_table[slot].initialized && lock_table[slot].last_app)
try to reuse it. If there is no saved application, set a flag so
that we won't save the current state. */
if (lock_table[slot].initialized)
{
app_t app = lock_table[slot].last_app;
lock_table[slot].last_app = NULL;
deallocate_app (app);
if (app)
{
lock_table[slot].last_app = NULL;
deallocate_app (app);
}
}
}
@ -380,7 +384,7 @@ deallocate_app (app_t app)
/* Free the resources associated with the application APP. APP is
allowed to be NULL in which case this is a no-op. Note that we are
using reference counting to track the users of the application and
actually deferiing the deallcoation to allow for a later resuse by
actually deferring the deallocation to allow for a later reuse by
a new connection. */
void
release_application (app_t app)