From 4b4c20196b01c44003667205f4be44e851267615 Mon Sep 17 00:00:00 2001 From: aj Date: Wed, 21 Apr 2004 21:11:06 +0000 Subject: [PATCH] better checking for null values. found and fixed reported by Victor Tarasov git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1777 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/pkcs11/slot.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pkcs11/slot.c b/src/pkcs11/slot.c index 71519781..c0ac5475 100644 --- a/src/pkcs11/slot.c +++ b/src/pkcs11/slot.c @@ -291,7 +291,9 @@ CK_RV slot_token_removed(int id) /* Release framework stuff */ if (slot->card != NULL) { - if (slot->fw_data != NULL) + if (slot->fw_data != NULL && + slot->card->framework != NULL && + slot->card->framework->release_token != NULL) slot->card->framework->release_token(slot->card, slot->fw_data); slot->card->num_slots--; }