comparison mcabber/src/roster.c @ 301:efcbd3c1ad15

Free unread_list when the roster is freed It fixes a bug after a /disconnect
author Mikael Berthe <mikael@lilotux.net>
date Mon, 11 Jul 2005 18:52:29 +0100
parents 49e9e02dd6d0
children 45076d02eeef 33b8e801ffa6
comparison
equal deleted inserted replaced
300:12f919be3da5 301:efcbd3c1ad15
200 200
201 // Free all roster data and call buddylist_build() to free the buddylist. 201 // Free all roster data and call buddylist_build() to free the buddylist.
202 void roster_free(void) 202 void roster_free(void)
203 { 203 {
204 GSList *sl_grp = groups; 204 GSList *sl_grp = groups;
205
206 // Free unread_list
207 if (unread_list) {
208 g_slist_free(unread_list);
209 unread_list = NULL;
210 }
205 211
206 // Walk through groups 212 // Walk through groups
207 while (sl_grp) { 213 while (sl_grp) {
208 roster *roster_grp = (roster*)sl_grp->data; 214 roster *roster_grp = (roster*)sl_grp->data;
209 GSList *sl_usr = roster_grp->list; 215 GSList *sl_usr = roster_grp->list;