diff options
author | James Booth <boothj5@gmail.com> | 2015-02-10 19:39:18 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-02-10 19:39:18 +0000 |
commit | 30739ed157efcacd38dee69e35872f8ca9215b2f (patch) | |
tree | a3890463921fc364ecbec6e3717359119f6c253c | |
parent | 6bee6cb0fbc7215091cbcbe9d146835a1a5405cb (diff) | |
download | profani-tty-30739ed157efcacd38dee69e35872f8ca9215b2f.tar.gz |
Free contact list
-rw-r--r-- | src/command/commands.c | 1 | ||||
-rw-r--r-- | src/ui/console.c | 9 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/command/commands.c b/src/command/commands.c index 6eca1bd1..af5c8cc8 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -1188,6 +1188,7 @@ _who_roster(gchar **args, struct cmd_help_t help) g_slist_free(filtered); } + list = g_slist_nth(list, 0); g_slist_free(list); } 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(); } |