Add missing va_end.

This commit is contained in:
kevlo 2012-09-29 16:19:01 +00:00
parent 147924627e
commit 3afe08ab11

View File

@ -727,8 +727,10 @@ proto_printf(struct stream *wr, const char *format, ...)
while ((cp = strchr(fmt, '%')) != NULL) {
if (cp > fmt) {
n = stream_write(wr, fmt, cp - fmt);
if (n == -1)
if (n == -1) {
va_end(ap);
return (-1);
}
}
if (*++cp == '\0')
goto done;