mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Free list in wins_get_num
This commit is contained in:
parent
2c4e2d5dbd
commit
d89ac912eb
@ -154,6 +154,7 @@ wins_get_by_recipient(const char * const recipient)
|
|||||||
while (curr != NULL) {
|
while (curr != NULL) {
|
||||||
ProfWin *window = curr->data;
|
ProfWin *window = curr->data;
|
||||||
if (g_strcmp0(window->from, recipient) == 0) {
|
if (g_strcmp0(window->from, recipient) == 0) {
|
||||||
|
g_list_free(values);
|
||||||
return window;
|
return window;
|
||||||
}
|
}
|
||||||
curr = g_list_next(curr);
|
curr = g_list_next(curr);
|
||||||
@ -173,11 +174,13 @@ wins_get_num(ProfWin *window)
|
|||||||
gconstpointer num_p = curr->data;
|
gconstpointer num_p = curr->data;
|
||||||
ProfWin *curr_win = g_hash_table_lookup(windows, num_p);
|
ProfWin *curr_win = g_hash_table_lookup(windows, num_p);
|
||||||
if (g_strcmp0(curr_win->from, window->from) == 0) {
|
if (g_strcmp0(curr_win->from, window->from) == 0) {
|
||||||
|
g_list_free(keys);
|
||||||
return GPOINTER_TO_INT(num_p);
|
return GPOINTER_TO_INT(num_p);
|
||||||
}
|
}
|
||||||
curr = g_list_next(curr);
|
curr = g_list_next(curr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_list_free(keys);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user