1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Free rooms list in sv_ev_login_account_success

This commit is contained in:
James Booth 2016-07-25 23:11:41 +01:00
parent 71730e9d99
commit 5f8ef3816c

View File

@ -79,7 +79,8 @@ sv_ev_login_account_success(char *account_name, gboolean secured)
ui_handle_login_account_success(account, secured);
// attempt to rejoin rooms with passwords
GList *curr = muc_rooms();
GList *rooms = muc_rooms();
GList *curr = rooms;
while (curr) {
char *password = muc_password(curr->data);
if (password) {
@ -88,7 +89,7 @@ sv_ev_login_account_success(char *account_name, gboolean secured)
}
curr = g_list_next(curr);
}
g_list_free(curr);
g_list_free(rooms);
log_info("%s logged in successfully", account->jid);