From 7a1544e76a829ae66db8efaa4a0d32cb61356d5f Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Tue, 20 Sep 2022 14:26:06 -0300 Subject: [PATCH] Fix issue #1735 --- mongoose.c | 1 + src/net.c | 1 + 2 files changed, 2 insertions(+) diff --git a/mongoose.c b/mongoose.c index f125bd52..9bb21bc1 100644 --- a/mongoose.c +++ b/mongoose.c @@ -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; } diff --git a/src/net.c b/src/net.c index eddf872c..2c9e330d 100644 --- a/src/net.c +++ b/src/net.c @@ -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; }