mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05: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:
parent
62730367d6
commit
f597de4889
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user