svn commit: r292311 - stable/10/sbin/swapon
Garrett Cooper
ngie at FreeBSD.org
Wed Dec 16 02:43:36 UTC 2015
Author: ngie
Date: Wed Dec 16 02:43:34 2015
New Revision: 292311
URL: https://svnweb.freebsd.org/changeset/base/292311
Log:
MFC r292005:
Call va_end on ap when vsnprintf fails in run_cmd(..) to clean up
the variable state
Reported by: cppcheck
Sponsored by: EMC / Isilon Storage Division
Modified:
stable/10/sbin/swapon/swapon.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sbin/swapon/swapon.c
==============================================================================
--- stable/10/sbin/swapon/swapon.c Wed Dec 16 01:05:50 2015 (r292310)
+++ stable/10/sbin/swapon/swapon.c Wed Dec 16 02:43:34 2015 (r292311)
@@ -640,6 +640,7 @@ run_cmd(int *ofd, const char *cmdline, .
rv = vasprintf(&cmd, cmdline, ap);
if (rv == -1) {
warn("%s", __func__);
+ va_end(ap);
return (rv);
}
va_end(ap);
More information about the svn-src-stable-10
mailing list