pk11_FreeSession(session);
if (session) pk11_FreeSession(session);
pk11_DestroySlotData(PK11Slot *slot){    int i;#ifdef PKCS11_USE_THREADS    if (slot->sessionLock) {	PZ_DestroyLock(slot->sessionLock);	slot->sessionLock = NULL;    }    if (slot->objectLock) {	PZ_DestroyLock(slot->objectLock);	slot->objectLock = NULL;    }#endif    PL_HashTableEnumerateEntries(slot->tokenHashTable,pk11_freeHashItem,NULL);    PL_HashTableDestroy(slot->tokenHashTable);    for(i=0; i < TOKEN_OBJECT_HASH_SIZE; i++) {	PK11Object *object = slot->tokObjects[i];	slot->tokObjects[i] = NULL;	pk11_FreeObject(object);    }    for(i=0; i < SESSION_HASH_SIZE; i++) {	PK11Session *session = slot->head[i];	slot->head[i] = NULL;	pk11_FreeSession(session);    }    pk11_DBShutdown(slot->certDB,slot->keyDB);    PORT_Free(slot);    return CKR_OK;}