ruby: Append newline character after printing exception in callback.
[libguestfs.git] / fish / fish.c
index efc74b2..1bc8447 100644 (file)
@@ -995,7 +995,7 @@ execute_and_inline (const char *cmd, int global_exit_on_error)
 
   free (line);
 
-  if (pclose (pp) == -1) {
+  if (pclose (pp) != 0) {
     perror ("pclose");
     return -1;
   }
@@ -1370,9 +1370,8 @@ parse_string_list (const char *str)
     /* We've reached the end of a token. We shouldn't still be in quotes. */
     if (in_quote) {
       fprintf (stderr, _("Runaway quote in string \"%s\"\n"), str);
-
       free_n_strings (argv, argv_len);
-
+      free (tok);
       return NULL;
     }