1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-07-07 18:04:15 -04:00

Free list in wins_get_num

This commit is contained in:
James Booth 2014-06-15 21:36:47 +01:00
parent 2c4e2d5dbd
commit d89ac912eb

View File

@ -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;
}