rv = STAN_AddModuleToDefaultTrustDomain(internalModule);
SECMOD_DeleteInternalModule(char *name) {    SECMODModuleList *mlp;    SECMODModuleList **mlpp;    SECStatus rv = SECFailure;    SECMOD_GetWriteLock(moduleLock);    for(mlpp = &modules,mlp = modules; 				mlp != NULL; mlpp = &mlp->next, mlp = *mlpp) {	if (PORT_Strcmp(name,mlp->module->commonName) == 0) {	    /* don't delete the internal module */	    if (mlp->module->internal) {		SECMOD_RemoveList(mlpp,mlp);		rv = STAN_RemoveModuleFromDefaultTrustDomain(mlp->module);	    } 	    break;	}    }    SECMOD_ReleaseWriteLock(moduleLock);    if (rv == SECSuccess) {	SECMODModule *newModule,*oldModule;	if (mlp->module->isFIPS) {    	    newModule = SECMOD_CreateModule(NULL,SECMOD_INT_NAME,NULL,			SECMOD_INT_FLAGS);	} else {    	    newModule = SECMOD_CreateModule(NULL,SECMOD_FIPS_NAME,NULL,			SECMOD_FIPS_FLAGS);	}	if (newModule == NULL) {	    SECMODModuleList *last = NULL,*mlp2;	   /* we're in pretty deep trouble if this happens...Security	    * not going to work well... try to put the old module back on	    * the list */	   SECMOD_GetWriteLock(moduleLock);	   for(mlp2 = modules; mlp2 != NULL; mlp2 = mlp->next) {		last = mlp2;	   }	   if (last == NULL) {		modules = mlp;	   } else {		SECMOD_AddList(last,mlp,NULL);	   }	   SECMOD_ReleaseWriteLock(moduleLock);	   return SECFailure; 	}	newModule->libraryParams = 	     PORT_ArenaStrdup(mlp->module->arena,mlp->module->libraryParams);	oldModule = internalModule;	internalModule = SECMOD_ReferenceModule(newModule);	SECMOD_AddModule(internalModule);	SECMOD_DestroyModule(oldModule); 	SECMOD_DeletePermDB(mlp->module);	SECMOD_DestroyModuleListElement(mlp);	rv = STAN_AddModuleToDefaultTrustDomain(internalModule);    }    return rv;}