On Fri, Jul 25, 2014 at 05:36:14PM +0200, Pino Toscano wrote:
--- 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; }
Ugh yes. Coverity, right? Please push obvious fixes found by Coverity like these. They don't need acking I don't think. Thanks, Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org