diff options
author | Michael Vetter <jubalh@iodoru.org> | 2020-04-06 16:04:34 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2020-04-06 16:09:38 +0200 |
commit | 5862e5b159bae4fdf75388067a0a9ae6869a255e (patch) | |
tree | 2497379338802c13e4cbbe4d95e41c766d566b96 | |
parent | 1afb708533b5dd1cf73c945f7c8a13baccb1644f (diff) | |
download | profani-tty-5862e5b159bae4fdf75388067a0a9ae6869a255e.tar.gz |
db: Fix memleaks
-rw-r--r-- | src/database.c | 1 | ||||
-rw-r--r-- | src/ui/chatwin.c | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/database.c b/src/database.c index b343f18d..c48f2f95 100644 --- a/src/database.c +++ b/src/database.c @@ -315,6 +315,7 @@ log_database_get_previous_chat(const gchar *const contact_barejid) history = g_slist_append(history, msg); } sqlite3_finalize(stmt); + free(query); return history; } diff --git a/src/ui/chatwin.c b/src/ui/chatwin.c index 34bf3902..5e2ac8c2 100644 --- a/src/ui/chatwin.c +++ b/src/ui/chatwin.c @@ -491,8 +491,7 @@ _chatwin_history(ProfChatWin *chatwin, const char *const contact_barejid) } chatwin->history_shown = TRUE; - //TODO: message_free - g_slist_free_full(history, free); + g_slist_free_full(history, (GDestroyNotify)message_free); } } |