about summary refs log tree commit diff stats
path: root/src/ui
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-06-15 21:36:47 +0100
committerJames Booth <boothj5@gmail.com>2014-06-15 21:36:47 +0100
commitd89ac912eb379f571ec37e59aea7e1e1d4b39ed5 (patch)
tree3de01763d6185016955f28fc45e5c931546449c0 /src/ui
parent2c4e2d5dbd48dd06a2aa0ebd6fae59c0c2a2c337 (diff)
downloadprofani-tty-d89ac912eb379f571ec37e59aea7e1e1d4b39ed5.tar.gz
Free list in wins_get_num
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/windows.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ui/windows.c b/src/ui/windows.c
index c2edb9e1..c3c44795 100644
--- a/src/ui/windows.c
+++ b/src/ui/windows.c
@@ -154,6 +154,7 @@ wins_get_by_recipient(const char * const recipient)
     while (curr != NULL) {
         ProfWin *window = curr->data;
         if (g_strcmp0(window->from, recipient) == 0) {
+            g_list_free(values);
             return window;
         }
         curr = g_list_next(curr);
@@ -173,11 +174,13 @@ wins_get_num(ProfWin *window)
         gconstpointer num_p = curr->data;
         ProfWin *curr_win = g_hash_table_lookup(windows, num_p);
         if (g_strcmp0(curr_win->from, window->from) == 0) {
+            g_list_free(keys);
             return GPOINTER_TO_INT(num_p);
         }
         curr = g_list_next(curr);
     }
 
+    g_list_free(keys);
     return -1;
 }