BLOCK_INPUT;
if (fstat (fd, &sbuf) < 0
|| (sbuf.st_mode & S_IFMT) != S_IFDIR
- || (dirp = (DIR *) malloc (sizeof (DIR))) == 0)
+ || (dirp = (DIR *) xmalloc (sizeof (DIR))) == 0)
{
emacs_close (fd);
UNBLOCK_INPUT;
else if (mkdir (unixDirName, 0700) != 0) /* create it if not */
return NULL;
- TempDirName = (char *) malloc (strlen (unixDirName) + 1);
+ TempDirName = (char *) xmalloc (strlen (unixDirName) + 1);
strcpy (TempDirName, unixDirName);
}
/* After expanding all the arguments, we now know the length of the parameter block to be
sent to the subprocess as a message attached to the HLE. */
- param = (char *) malloc (paramlen + 1);
+ param = (char *) xmalloc (paramlen + 1);
if (!param)
return -1;
iErr = FSMakeFSSpec (0, 0, macappname, &spec);
if (iErr != noErr) {
- free (param);
+ xfree (param);
return -1;
}
lpbr.launchAppParameters = NULL;
iErr = LaunchApplication (&lpbr); /* call the subprocess */
- if (iErr != noErr) {
- free (param);
- return -1;
- }
+ if (iErr != noErr)
+ {
+ xfree (param);
+ return -1;
+ }
sendEvent.what = kHighLevelEvent;
sendEvent.message = kEmacsSubprocessSend; /* Event ID stored in "where" unused */
while (iErr == sessClosedErr && retries-- > 0);
if (iErr != noErr) {
- free (param);
+ xfree (param);
return -1;
}
iErr = AcceptHighLevelEvent (&targ, &refCon, NULL, &len);
if (iErr != noErr) {
DisposeHandle ((Handle) cursorRegionHdl);
- free (param);
+ xfree (param);
return -1;
}
DisposeHandle ((Handle) cursorRegionHdl);
- free (param);
+ xfree (param);
return refCon;
}
CInfoPBRec cipb;
int len;
- dirp = (DIR *) malloc (sizeof (DIR));
+ dirp = (DIR *) xmalloc (sizeof (DIR));
if (!dirp)
return 0;