better checking for null values.
found and fixed reported by Victor Tarasov <vtarasov@idealx.com> git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1777 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
8cb6a3f94a
commit
4b4c20196b
|
@ -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--;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue