if ((symKey->series != slot->series) || (!symKey->sessionOwner)) symKey->session = pk11_GetNewSession(slot,&symKey->sessionOwner);
if (!needSession) { return symKey; }  if ((symKey->series != slot->series) || (symKey->session == CK_INVALID_SESSION)) { symKey->session = pk11_GetNewSession(slot, &symKey->sessionOwner); }
pk11_getKeyFromList(PK11SlotInfo *slot) {    PK11SymKey *symKey = NULL;    PZ_Lock(slot->freeListLock);    if (slot->freeSymKeysHead) {    	symKey = slot->freeSymKeysHead;	slot->freeSymKeysHead = symKey->next;	slot->keyCount--;    }    PZ_Unlock(slot->freeListLock);    if (symKey) {	symKey->next = NULL;	if ((symKey->series != slot->series) || (!symKey->sessionOwner))    	    symKey->session = pk11_GetNewSession(slot,&symKey->sessionOwner);	PORT_Assert(symKey->session != CK_INVALID_SESSION);	if (symKey->session != CK_INVALID_SESSION)	    return symKey;        PK11_FreeSymKey(symKey);    }    symKey = PORT_New(PK11SymKey);    if (symKey == NULL) {	return NULL;    }    symKey->next = NULL;    symKey->session = pk11_GetNewSession(slot,&symKey->sessionOwner);    PORT_Assert(symKey->session != CK_INVALID_SESSION);    if (symKey->session != CK_INVALID_SESSION)	return symKey;    PK11_FreeSymKey(symKey);    return NULL;}