From a8724bea785524be89407ce63f68a7244db52d3e Mon Sep 17 00:00:00 2001 From: sth Date: Tue, 24 Jun 2003 11:11:49 +0000 Subject: [PATCH] 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 --- src/pkcs11/slot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pkcs11/slot.c b/src/pkcs11/slot.c index db726099..db7a0cd6 100644 --- a/src/pkcs11/slot.c +++ b/src/pkcs11/slot.c @@ -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;