summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install
diff options
context:
space:
mode:
authorkevlo <kevlo@FreeBSD.org>2012-09-28 07:51:30 +0000
committerkevlo <kevlo@FreeBSD.org>2012-09-28 07:51:30 +0000
commita93e845e54aef353af783f879e3482a9e473a572 (patch)
treef864a7f6a0ad8eb6c98c82aec4ef26f6d771057c /usr.sbin/pkg_install
parent55f6ff40edbcb6a2a67bfeb9304aecc846a4390d (diff)
downloadFreeBSD-src-a93e845e54aef353af783f879e3482a9e473a572.zip
FreeBSD-src-a93e845e54aef353af783f879e3482a9e473a572.tar.gz
Make sure that each va_start has one and only one matching va_end,
especially in error cases.
Diffstat (limited to 'usr.sbin/pkg_install')
-rw-r--r--usr.sbin/pkg_install/lib/exec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.sbin/pkg_install/lib/exec.c b/usr.sbin/pkg_install/lib/exec.c
index c95ac47..0804501 100644
--- a/usr.sbin/pkg_install/lib/exec.c
+++ b/usr.sbin/pkg_install/lib/exec.c
@@ -93,6 +93,7 @@ vpipe(const char *fmt, ...)
fp = popen(cmd, "r");
if (fp == NULL) {
warnx("popen() failed");
+ va_end(args);
return NULL;
}
get_string(rp, MAXPATHLEN, fp);
OpenPOWER on IntegriCloud