if (slotParams) PORT_Free(slotParams);
pk11_mkNSS(char **slotStrings, int slotCount, PRBool internal, PRBool isFIPS,	  PRBool isModuleDB,  PRBool isModuleDBOnly, PRBool isCritical, 	  unsigned long trustOrder, unsigned long cipherOrder,				unsigned long ssl0, unsigned long ssl1) {    int slotLen, i;    char *slotParams, *ciphers, *nss, *nssFlags, *tmp;    char *trustOrderPair,*cipherOrderPair,*slotPair,*cipherPair,*flagPair;    /* now let's build up the string     * first the slot infos     */    slotLen=0;    for (i=0; i < (int)slotCount; i++) {	slotLen += PORT_Strlen(slotStrings[i])+1;    }    slotLen += 1; /* space for the final NULL */    slotParams = (char *)PORT_ZAlloc(slotLen);    PORT_Memset(slotParams,0,slotLen);    for (i=0; i < (int)slotCount; i++) {	PORT_Strcat(slotParams,slotStrings[i]);	PORT_Strcat(slotParams," ");	PR_smprintf_free(slotStrings[i]);	slotStrings[i]=NULL;    }        /*     * now the NSS structure     */    nssFlags = pk11_mkNSSFlags(internal,isFIPS,isModuleDB,isModuleDBOnly,							isCritical); 	/* for now only the internal module is critical */    ciphers = pk11_mkCipherFlags(ssl0, ssl1);    trustOrderPair=pk11_formatIntPair("trustOrder",trustOrder,0);    cipherOrderPair=pk11_formatIntPair("cipherOrder",cipherOrder,0);    slotPair=pk11_formatPair("slotParams",slotParams,'{'); /* } */    cipherPair=pk11_formatPair("ciphers",ciphers,'\'');    if (ciphers) PR_smprintf_free(ciphers);    flagPair=pk11_formatPair("Flags",nssFlags,'\'');    if (nssFlags) PORT_Free(nssFlags);    nss = PR_smprintf("%s %s %s %s %s",trustOrderPair,			cipherOrderPair,slotPair,cipherPair,flagPair);    pk11_freePair(trustOrderPair);    pk11_freePair(cipherOrderPair);    pk11_freePair(slotPair);    pk11_freePair(cipherPair);    pk11_freePair(flagPair);    tmp = pk11_argStrip(nss);    if (*tmp == '\0') {	PR_smprintf_free(nss);	nss = NULL;    }    return nss;}