[Libguestfs] [PATCH] p2v: properly call va_end

Pino Toscano ptoscano at redhat.com
Fri Jul 25 15:36:14 UTC 2014


---
 p2v/miniexpect.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/p2v/miniexpect.c b/p2v/miniexpect.c
index ec81030..1baab5f 100644
--- a/p2v/miniexpect.c
+++ b/p2v/miniexpect.c
@@ -114,6 +114,7 @@ mexp_spawnl (const char *file, const char *arg, ...)
     new_argv = realloc (argv, sizeof (char *) * (i+1));
     if (new_argv == NULL) {
       free (argv);
+      va_end (args);
       return NULL;
     }
     argv = new_argv;
@@ -122,6 +123,7 @@ mexp_spawnl (const char *file, const char *arg, ...)
 
   h = mexp_spawnv (file, argv);
   free (argv);
+  va_end (args);
   return h;
 }
 
-- 
1.9.3




More information about the Libguestfs mailing list