From: Pino Toscano Date: Fri, 25 Jul 2014 15:36:14 +0000 (+0200) Subject: p2v: properly call va_end X-Git-Tag: v1.1~14 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=bc076a67d2d2612517d41ba27ebbc692234f0a3b;p=miniexpect.git p2v: properly call va_end --- diff --git a/miniexpect.c b/miniexpect.c index 99bd29a..e1a184c 100644 --- a/miniexpect.c +++ b/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; }