free_drives (drv->next);
switch (drv->type) {
- case drv_a: free (drv->a.filename); break;
- case drv_d: free (drv->d.guest); break;
+ case drv_a: /* a.filename is optarg, don't free it */ break;
+ case drv_d: /* d.filename is optarg, don't free it */ break;
case drv_N:
free (drv->N.filename);
free (drv->N.device);
static char *
file_in_heredoc (const char *endmarker)
{
- static const char template[] = "/tmp/heredocXXXXXX";
+ TMP_TEMPLATE_ON_STACK (template);
file_in_tmpfile = strdup (template);
if (file_in_tmpfile == NULL) {
perror ("strdup");