In slot_initialize(): Bugfix in a memset and added a pool_initialize()

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1218 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
sth 2003-06-24 11:11:49 +00:00
parent 4fb623d537
commit a8724bea78
1 changed files with 2 additions and 1 deletions

View File

@ -207,7 +207,7 @@ CK_RV card_removed(int reader)
CK_RV slot_initialize(int id, struct sc_pkcs11_slot *slot)
{
memset(slot, 0, sizeof(slot));
memset(slot, 0, sizeof(*slot));
slot->id = id;
slot->login_user = -1;
init_slot_info(&slot->slot_info);
@ -305,6 +305,7 @@ CK_RV slot_token_removed(int id)
slot->slot_info.flags = 0;
slot->login_user = -1;
slot->reader = reader;
pool_initialize(&slot->object_pool, POOL_TYPE_OBJECT);
if (token_was_present)
slot->events = SC_EVENT_CARD_REMOVED;