PK11_FreeSlotList(list);
STAN_LoadDefaultNSS3TrustDomain(  void){    NSSTrustDomain *td;    NSSToken *token;    PK11SlotList *list;    PK11SlotListElement *le;    td = NSSTrustDomain_Create(NULL, NULL, NULL, NULL);    if (!td) {	return PR_FAILURE;    }    td->tokenList = nssList_Create(td->arena, PR_TRUE);    list = PK11_GetAllTokens(CKM_INVALID_MECHANISM, PR_FALSE, PR_FALSE, NULL);    if (list) {	for (le = list->head; le; le = le->next) {	    token = nssToken_CreateFromPK11SlotInfo(td, le->slot);	    PK11Slot_SetNSSToken(le->slot, token);	    nssList_Add(td->tokenList, token);	}	/* okay to free this, as the last reference is maintained in the	 * global slot lists	 */	PK11_FreeSlotList(list);    }    g_default_trust_domain = td;    g_default_crypto_context = NSSTrustDomain_CreateCryptoContext(td, NULL);    /* Cache hardware token certs with the token to make them persistent */    td->tokens = nssList_CreateIterator(td->tokenList);    for (token =  (NSSToken *)nssListIterator_Start(td->tokens);         token != (NSSToken *)NULL;	 token =  (NSSToken *)nssListIterator_Next(td->tokens))     {	nssToken_LoadCerts(token);    }    nssListIterator_Finish(td->tokens);    return PR_SUCCESS;}