From 5f8ef3816c9e408c83d8a0db38b3d86b42c10957 Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 25 Jul 2016 23:11:41 +0100 Subject: [PATCH] Free rooms list in sv_ev_login_account_success --- src/event/server_events.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/event/server_events.c b/src/event/server_events.c index b8154b8e..1b935c6a 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -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);