contrib: Note about what needs to be done for visualization.
[libguestfs.git] / fish / fish.c
index 6192860..6aadd56 100644 (file)
@@ -701,8 +701,8 @@ free_drives (struct drv *drv)
   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);
@@ -1561,7 +1561,7 @@ file_in (const char *arg)
 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");