Add missing va_end.

This commit is contained in:
Kevin Lo 2012-09-29 16:19:01 +00:00
parent 374c6ff93a
commit e81fdb14a9

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;