#include <sys/time.h>
#include <sys/stat.h>
#include <sys/wait.h>
+#ifdef __OSX__
+#include "queue.h"
+#else
#include <sys/queue.h>
+#endif
#include <sys/param.h>
#include <sys/select.h>
#if defined(__linux__)
err(1, "setautorun: realloc");
a.argv[argc - 1] = ap;
}
- free(str);
if ((a.argv = realloc(a.argv, (argc + 1) * sizeof(char *))) == NULL)
err(1, "setautorun: realloc");
_exit(1);
}
free(a.argv);
+ free(str);
/* parent */
p = find_pid(pid);