maint: add missing va_end

'va_start' must have a corresponding 'va_end'.  Depending on the
implementation, the consequence of a missing 'va_end' may be a
corrupted stack.

* find/print.c (checked_fprintf): Add va_end.

Spotted by coverity analysis.
This commit is contained in:
Bernhard Voelker 2018-02-04 18:20:25 +01:00
parent 8b27459ef9
commit 76d7e2dcb4

View File

@ -803,6 +803,7 @@ checked_fprintf (struct format_val *dest, const char *fmt, ...)
va_start (ap, fmt);
rv = vfprintf (dest->stream, fmt, ap);
va_end (ap);
if (rv < 0)
nonfatal_nontarget_file_error (errno, dest->filename);
}