Free unread_list when the roster is freed
authorMikael Berthe <mikael@lilotux.net>
Mon, 11 Jul 2005 18:52:29 +0100
changeset 301 efcbd3c1ad15
parent 300 12f919be3da5
child 302 8ca708a0d550
Free unread_list when the roster is freed It fixes a bug after a /disconnect
mcabber/src/roster.c
--- a/mcabber/src/roster.c	Sun Jul 10 22:36:55 2005 +0100
+++ b/mcabber/src/roster.c	Mon Jul 11 18:52:29 2005 +0100
@@ -203,6 +203,12 @@
 {
   GSList *sl_grp = groups;
 
+  // Free unread_list
+  if (unread_list) {
+    g_slist_free(unread_list);
+    unread_list = NULL;
+  }
+
   // Walk through groups
   while (sl_grp) {
     roster *roster_grp = (roster*)sl_grp->data;