mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 09:16:22 +00:00
Fix memleak in autocomplete_remove_older_than_max*
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user