1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-30 21:55:24 +00:00

Properly free buffer entry

g_slist_delete_link() is not enough we also need to call _free_entry()
on the entry.

This fixes a memleak in win_insert_last_read_position_marker()
This commit is contained in:
Michael Vetter 2020-02-25 16:06:00 +01:00
parent 62730367d6
commit f597de4889

View File

@ -114,6 +114,7 @@ buffer_remove_entry_by_id(ProfBuff buffer, const char *const id)
while (entries) {
ProfBuffEntry *entry = entries->data;
if (entry->id && (g_strcmp0(entry->id, id) == 0)) {
_free_entry(entry);
buffer->entries = g_slist_delete_link(buffer->entries, entries);
}
entries = g_slist_next(entries);