if (!token_is_present(cache)) { return; }
nssTokenObjectCache_RemoveObject (  nssTokenObjectCache *cache,  nssCryptokiObject *object){    PRUint32 oType;    nssCryptokiObjectAndAttributes **oa, **swp = NULL;    PZ_Lock(cache->lock);    for (oType=0; oType<3; oType++) {	if (!cache_available_for_object_type(cache, oType) ||	    !cache->objects[oType])	{	    continue;	}	for (oa = cache->objects[oType]; *oa; oa++) {	    if (nssCryptokiObject_Equal((*oa)->object, object)) {		swp = oa; /* the entry to remove */		while (oa[1]) oa++; /* go to the tail */		(*swp)->object->token = NULL;		nssCryptokiObject_Destroy((*swp)->object);		nssArena_Destroy((*swp)->arena); /* destroy it */		*swp = *oa; /* swap the last with the removed */		*oa = NULL; /* null-terminate the array */		break;	    }	}	if (swp) {	    break;	}    }    if ((oType <3) &&		cache->objects[oType] && cache->objects[oType][0] == NULL) {	nss_ZFreeIf(cache->objects[oType]); /* no entries remaining */	cache->objects[oType] = NULL;    }    PZ_Unlock(cache->lock);}