about summary refs log tree commit diff stats
path: root/src/ui/core.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-06-27 00:38:53 +0100
committerJames Booth <boothj5@gmail.com>2014-06-27 00:38:53 +0100
commit186cac34deb9f1469d5d2719b5a5746ff26156e2 (patch)
tree885dea0b0a4afa0d2fcf9297c1bde5a7bc3c2719 /src/ui/core.c
parentc98ce4299de670dd5d270308bf7137ea05d9c763 (diff)
downloadprofani-tty-186cac34deb9f1469d5d2719b5a5746ff26156e2.tar.gz
Fixed memleak in chat log history
Diffstat (limited to 'src/ui/core.c')
-rw-r--r--src/ui/core.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ui/core.c b/src/ui/core.c
index 254af048..262eb4d3 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -2131,13 +2131,13 @@ _win_show_history(WINDOW *win, int win_index, const char * const contact)
 {
     ProfWin *window = wins_get_by_num(win_index);
     if (!window->history_shown) {
-        GSList *history = NULL;
         Jid *jid = jid_create(jabber_get_fulljid());
-        history = chat_log_get_previous(jid->barejid, contact, history);
+        GSList *history = chat_log_get_previous(jid->barejid, contact);
         jid_destroy(jid);
-        while (history != NULL) {
-            wprintw(win, "%s\n", history->data);
-            history = g_slist_next(history);
+        GSList *curr = history;
+        while (curr != NULL) {
+            wprintw(win, "%s\n", curr->data);
+            curr = g_slist_next(curr);
         }
         window->history_shown = 1;