diff options
author | Michael Vetter <jubalh@iodoru.org> | 2020-02-25 16:06:00 +0100 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2020-02-25 16:06:00 +0100 |
commit | f597de4889177564a02b154ad7f05193e39a9057 (patch) | |
tree | ce938fc40f8d8e75be82ff6dad7000084d1d9dc6 | |
parent | 62730367d6fe064cae38ba3930feec8575e77029 (diff) | |
download | profani-tty-f597de4889177564a02b154ad7f05193e39a9057.tar.gz |
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()
-rw-r--r-- | src/ui/buffer.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ui/buffer.c b/src/ui/buffer.c index 448c11ae..6a7f7818 100644 --- a/src/ui/buffer.c +++ b/src/ui/buffer.c @@ -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); |