// try to find the command in predefined path's
while (ExePathList[i])
{
- cmdLine = (char *) Safe_malloc (strlen (ExePathList[i]) + strlen (cmd) + 10);
+ cmdLine = (char *) Safe_alloc (strlen (ExePathList[i]) + strlen (cmd) + 10);
strcpy (cmdLine, ExePathList[i]); // the path
strcat (cmdLine, DIR_SEPARATOR_STRING);
strcat (cmdLine, cmd + argsStart);
break;
}
- free (cmdLine);
+ Safe_free (cmdLine);
cmdLine = NULL;
i++;
}
{
// command found in predefined path
e = system (cmdLine);
- free (cmdLine);
+ Safe_free (cmdLine);
}
else
{