diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2020-07-10 22:49:56 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2020-07-10 22:49:56 +0100 |
commit | 63c4307e5873801eaed051ef258d90a52a7d19e7 (patch) | |
tree | 65394d21302bffa005cd3b2f96be82953623e754 | |
parent | 99ea5f6faeaf714e34bbcd75fdc50cc94dc7a1c8 (diff) |
Release unused memory in parse_quote_2047()
-rw-r--r-- | src/src/parse.c | 9 |
1 files changed, 7 insertions, 2 deletions
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; } |