mirror of
https://github.com/profanity-im/profanity.git
synced 2025-02-02 15:08:15 -05:00
Fix memleak in autocomplete_remove_older_than_max*
This commit is contained in:
parent
bfaf737efa
commit
de91a99178
@ -407,6 +407,7 @@ autocomplete_remove_older_than_max_reverse(Autocomplete ac, int maxsize)
|
|||||||
if (autocomplete_length(ac) > maxsize) {
|
if (autocomplete_length(ac) > maxsize) {
|
||||||
GList *last = g_list_last(ac->items);
|
GList *last = g_list_last(ac->items);
|
||||||
if (last) {
|
if (last) {
|
||||||
|
free(last->data);
|
||||||
ac->items = g_list_delete_link(ac->items, last);
|
ac->items = g_list_delete_link(ac->items, last);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user