if (slot->mechanismList) { PORT_Free(slot->mechanismList); }
PK11_DestroySlot(PK11SlotInfo *slot){   /* first free up all the sessions on this slot */   if (slot->functionList) {	PK11_GETTAB(slot)->C_CloseAllSessions(slot->slotID);   }   /* free up the cached keys and sessions */   PK11_CleanKeyList(slot);   /* finally Tell our parent module that we've gone away so it can unload */   if (slot->module) {	SECMOD_SlotDestroyModule(slot->module,PR_TRUE);   }#ifdef PKCS11_USE_THREADS   if (slot->refLock) {	PZ_DestroyLock(slot->refLock);	slot->refLock = NULL;   }   if (slot->sessionLock) {	PZ_DestroyLock(slot->sessionLock);	slot->sessionLock = NULL;   }   if (slot->freeListLock) {	PZ_DestroyLock(slot->freeListLock);	slot->freeListLock = NULL;   }#endif   /* ok, well not quit finally... now we free the memory */   PORT_Free(slot);}