From: Jeremy Harris Date: Fri, 10 Jul 2020 21:49:56 +0000 (+0100) Subject: Release unused memory in parse_quote_2047() X-Git-Url: https://git.exim.org/users/heiko/exim.git/commitdiff_plain/63c4307e5873801eaed051ef258d90a52a7d19e7 Release unused memory in parse_quote_2047() --- diff --git a/src/src/parse.c b/src/src/parse.c index acece9b78..2b2ffd341 100644 --- a/src/src/parse.c +++ b/src/src/parse.c @@ -904,8 +904,13 @@ for (s = string; len > 0; s++, len--) { g = string_catn(g, s, 1); first_byte = FALSE; } } -g = string_catn(g, US"?=", 2); -return coded ? string_from_gstring(g) : string; +if (coded) + string = string_from_gstring(g = string_catn(g, US"?=", 2)); +else + g->ptr = -1; + +gstring_release_unused(g); +return string; }