if (!secmodName || *secmodName == '\0') secmodName = PORT_Strdup(SECMOD_DB);
if (!secmodName || *secmodName == '\0') { if (secmodName) PORT_Free(secmodName); secmodName = PORT_Strdup(SECMOD_DB); }
secmod_getSecmodName(char *param, char **appName, char **filename,PRBool *rw){    int next;    char *configdir = NULL;    char *secmodName = NULL;    char *value = NULL;    char *save_params = param;    const char *lconfigdir;    param = pk11_argStrip(param);	    while (*param) {	PK11_HANDLE_STRING_ARG(param,configdir,"configDir=",;)	PK11_HANDLE_STRING_ARG(param,secmodName,"secmod=",;)	PK11_HANDLE_FINAL_ARG(param)   }   *rw = PR_TRUE;   if (pk11_argHasFlag("flags","readOnly",save_params) ||	pk11_argHasFlag("flags","noModDB",save_params)) *rw = PR_FALSE;   if (!secmodName || *secmodName == '\0') secmodName = PORT_Strdup(SECMOD_DB);   *filename = secmodName;   lconfigdir = pk11_EvaluateConfigDir(configdir, appName);   if (lconfigdir) {	value = PR_smprintf("%s" PATH_SEPARATOR "%s",lconfigdir,secmodName);   } else {	value = PR_smprintf("%s",secmodName);   }   if (configdir) PORT_Free(configdir);   return value;}