Merge pull request #1748 from cesanta/va_end

Fix issue #1735
This commit is contained in:
Sergey Lyubka 2022-09-21 09:43:47 +01:00 committed by GitHub
commit fe8a7d8db9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -3280,6 +3280,7 @@ size_t mg_vprintf(struct mg_connection *c, const char *fmt, va_list ap) {
va_list tmp;
va_copy(tmp, ap);
mg_vxprintf(mg_pfn_iobuf, &c->send, fmt, &tmp);
va_end(tmp);
return c->send.len - old;
}

View File

@ -10,6 +10,7 @@ size_t mg_vprintf(struct mg_connection *c, const char *fmt, va_list ap) {
va_list tmp;
va_copy(tmp, ap);
mg_vxprintf(mg_pfn_iobuf, &c->send, fmt, &tmp);
va_end(tmp);
return c->send.len - old;
}