# HG changeset patch # User Mikael Berthe # Date 1196804826 -3600 # Node ID cefda9174d62834d4ebe8962f55ff4256487de05 # Parent 40371a7d49f43dd83324ceb7c72070714facffff Fix an old bug in roster_del_user() diff -r 40371a7d49f4 -r cefda9174d62 mcabber/src/roster.c --- a/mcabber/src/roster.c Tue Dec 04 19:38:24 2007 +0100 +++ b/mcabber/src/roster.c Tue Dec 04 22:47:06 2007 +0100 @@ -434,8 +434,7 @@ roster *roster_usr; GSList *node; - sl_user = roster_find(jid, jidsearch, - ROSTER_TYPE_USER|ROSTER_TYPE_AGENT|ROSTER_TYPE_ROOM); + sl_user = roster_find(jid, jidsearch, ROSTER_TYPE_USER|ROSTER_TYPE_AGENT); if (sl_user == NULL) return; roster_usr = (roster*)sl_user->data; @@ -447,11 +446,12 @@ if (roster_usr->flags & ROSTER_FLAG_MSG) unread_jid_add(roster_usr->jid); + sl_group = roster_usr->list; + // Let's free roster_usr memory (jid, name, status message...) free_roster_user_data(roster_usr); // That's a little complex, we need to dereference twice - sl_group = ((roster*)sl_user->data)->list; sl_group_listptr = &((roster*)(sl_group->data))->list; *sl_group_listptr = g_slist_delete_link(*sl_group_listptr, sl_user);