Handle the case where we don't get the Token object from NewToken (It gets converted from a session object in handleobjects).

This commit is contained in:
relyea%netscape.com 2002-07-02 19:58:49 +00:00
parent 99e5ca772d
commit 4f9e4c1700

View File

@ -1841,6 +1841,9 @@ pk11_PutObjectToList(PK11Object *object, PK11ObjectFreeList *list,
PRBool optimizeSpace = isSessionObject &&
((PK11SessionObject *)object)->optimizeSpace;
if (!optimizeSpace && (list->count < MAX_OBJECT_LIST_SIZE)) {
if (list->lock == NULL) {
list->lock = PZ_NewLock(nssILockObject);
}
PK11_USE_THREADS(PZ_Lock(list->lock));
object->next = list->head;
list->head = object;