Gitweb:
https://git.exim.org/exim.git/commitdiff/63c4307e5873801eaed051ef258d90a52a7d19e7
Commit: 63c4307e5873801eaed051ef258d90a52a7d19e7
Parent: 99ea5f6faeaf714e34bbcd75fdc50cc94dc7a1c8
Author: Jeremy Harris <jgh146exb@???>
AuthorDate: Fri Jul 10 22:49:56 2020 +0100
Committer: Jeremy Harris <jgh146exb@???>
CommitDate: Fri Jul 10 22:49:56 2020 +0100
Release unused memory in parse_quote_2047()
---
src/src/parse.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/src/parse.c b/src/src/parse.c
index acece9b..2b2ffd3 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;
}