about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-05-29 11:28:58 +0200
committerMichael Vetter <jubalh@iodoru.org>2020-05-29 11:28:58 +0200
commitde91a99178c1a26d9c1355fe1b3a8ec60788ecf6 (patch)
tree7a210fbd2c0bd45590294a09397fdc2c3c40447a
parentbfaf737efad0766e62e8c9100a7c96ca97346e51 (diff)
downloadprofani-tty-de91a99178c1a26d9c1355fe1b3a8ec60788ecf6.tar.gz
Fix memleak in autocomplete_remove_older_than_max*
-rw-r--r--src/tools/autocomplete.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tools/autocomplete.c b/src/tools/autocomplete.c
index ca5fe772..2f8cde3e 100644
--- a/src/tools/autocomplete.c
+++ b/src/tools/autocomplete.c
@@ -407,6 +407,7 @@ autocomplete_remove_older_than_max_reverse(Autocomplete ac, int maxsize)
     if (autocomplete_length(ac) > maxsize) {
         GList *last = g_list_last(ac->items);
         if (last) {
+            free(last->data);
             ac->items = g_list_delete_link(ac->items, last);
         }
     }