about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-04-06 16:04:34 +0200
committerMichael Vetter <jubalh@iodoru.org>2020-04-06 16:09:38 +0200
commit5862e5b159bae4fdf75388067a0a9ae6869a255e (patch)
tree2497379338802c13e4cbbe4d95e41c766d566b96
parent1afb708533b5dd1cf73c945f7c8a13baccb1644f (diff)
downloadprofani-tty-5862e5b159bae4fdf75388067a0a9ae6869a255e.tar.gz
db: Fix memleaks
-rw-r--r--src/database.c1
-rw-r--r--src/ui/chatwin.c3
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);
     }
 }