From 897dfbb3c1f74961ab068e460b99a128a270efb8 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Sun, 6 Oct 2019 17:42:44 +0200 Subject: [PATCH] Fix memleak in get_start() Regards https://github.com/profanity-im/profanity/issues/1019 --- src/tools/parser.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/parser.c b/src/tools/parser.c index 474a664e..c6e1b73e 100644 --- a/src/tools/parser.c +++ b/src/tools/parser.c @@ -368,6 +368,7 @@ get_start(const char *const string, int tokens) int len = g_unichar_to_utf8(curr_uni, uni_char); uni_char[len] = '\0'; g_string_append(result, uni_char); + free(uni_char); } if (curr_uni == ' ') { if (!in_quotes) {