remove all login states when the token was removed

This commit is contained in:
Frank Morgner 2016-09-02 02:05:34 +02:00
parent 42a9df3bd9
commit 7e6dc25c40
2 changed files with 1 additions and 1 deletions

View File

@ -316,7 +316,6 @@ CK_RV C_Finalize(CK_VOID_PTR pReserved)
while ((slot = list_fetch(&virtual_slots))) {
list_destroy(&slot->objects);
pop_all_login_states(slot);
list_destroy(&slot->logins);
free(slot);
}

View File

@ -449,6 +449,7 @@ CK_RV slot_token_removed(CK_SLOT_ID id)
/* Reset relevant slot properties */
slot->slot_info.flags &= ~CKF_TOKEN_PRESENT;
slot->login_user = -1;
pop_all_login_states(slot);
slot->p11card = NULL;
if (token_was_present)