/* get rid of the "." */
strtok (buffer, ".");
- srcFileName = Safe_calloc (1, strlen (buffer) + 1);
+ srcFileName = Safe_alloc ( strlen (buffer) + 1);
strcpy (srcFileName, buffer);
/* get rid of any path information
*(fext - 1) != '/' &&
*(fext - 1) != ':')
fext--;
- moduleName = Safe_calloc (1, strlen (fext) + 1);
+ moduleName = Safe_alloc ( strlen (fext) + 1);
strcpy (moduleName, fext);
return;
segName = strdup(N); \
c = strtok(segName, " \t"); \
fprintf (lnkfile,"-b %s = 0x%04x\n", c, L); \
- if (segName) { free(segName); }
+ if (segName) { Safe_free(segName); }
/* code segment start */
WRITE_SEG_LOC (CODE_NAME, options.code_loc);
setMainValue ("cppextraopts", join(preArgv));
if (!preProcOnly)
- preOutName = strdup (tempfilename ());
+ preOutName = Safe_strdup (tempfilename ());
/* Have to set cppoutfilename to something, even if just pre-processing. */
setMainValue ("cppoutfilename", preOutName ? preOutName : "");
if (preOutName)
{
unlink (preOutName);
- free (preOutName);
+ Safe_free (preOutName);
}
// EndFix
exit (1);
if (yyin && yyin != stdin)
fclose (yyin);
unlink (preOutName);
- free (preOutName);
+ Safe_free (preOutName);
}
// EndFix
return 1;
if (yyin && yyin != stdin)
fclose (yyin);
unlink (preOutName);
- free (preOutName);
+ Safe_free (preOutName);
}
// EndFix
#if defined (__MINGW32__) || defined (__CYGWIN__) || defined (_MSC_VER)
if (preOutName && !options.c1mode)
{
unlink (preOutName);
- free (preOutName);
+ Safe_free (preOutName);
}
if (!options.cc_only &&