From 30739ed157efcacd38dee69e35872f8ca9215b2f Mon Sep 17 00:00:00 2001 From: James Booth Date: Tue, 10 Feb 2015 19:39:18 +0000 Subject: Free contact list --- src/ui/console.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/ui') diff --git a/src/ui/console.c b/src/ui/console.c index 2c37c40c..8d6f88b4 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -402,17 +402,18 @@ cons_show_sent_subs(void) GSList *contacts = roster_get_contacts(); PContact contact = NULL; cons_show("Awaiting subscription responses from:"); - while (contacts != NULL) { - contact = (PContact) contacts->data; + GSList *curr = contacts; + while (curr != NULL) { + contact = (PContact) curr->data; if (p_contact_pending_out(contact)) { cons_show(" %s", p_contact_barejid(contact)); } - contacts = g_slist_next(contacts); + curr = g_slist_next(curr); } + g_slist_free(contacts); } else { cons_show("No pending requests sent."); } - cons_alert(); } -- cgit 1.4.1-2-gfad0