diff options
author | Michael Vetter <jubalh@iodoru.org> | 2019-10-06 19:05:27 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2019-10-06 19:05:27 +0200 |
commit | 9b3517c21eb4344b555f663253c4c837b5cf2313 (patch) | |
tree | 1a1fbeb600145bc205ea116196807a49bcdc3cb8 /src | |
parent | 94b401ab965adc641c90d12231704b13ec28c11c (diff) | |
download | profani-tty-9b3517c21eb4344b555f663253c4c837b5cf2313.tar.gz |
Free strings in autocomplete_param_no_with_func
Regards https://github.com/profanity-im/profanity/issues/1019
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/autocomplete.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tools/autocomplete.c b/src/tools/autocomplete.c index 03a30553..e47e704f 100644 --- a/src/tools/autocomplete.c +++ b/src/tools/autocomplete.c @@ -366,10 +366,17 @@ autocomplete_param_no_with_func(const char *const input, char *command, int arg_ result_str = g_string_new(""); g_string_append(result_str, start_str); g_string_append(result_str, found); + + free(start_str); + free(comp_str); + char *result = result_str->str; g_string_free(result_str, FALSE); + return result; } + } else { + free(start_str); } } } |