# HG changeset patch # User Paul Aurich # Date 1241405822 0 # Node ID 9cb95f21979d89b1e2139a1bfc8642a5685e8fdf # Parent 0cc77ced0ae366813bd00124898ace8ca14e27ab# Parent d97a130da2905b9917d44cf684e7cfccf56a59bf merge of '7e8d9f694132bc0cdbb6088ca5b557480c71ba45' and 'f19814a9bc18cc2b84bdfc83d02569128c4fd66f' diff -r 0cc77ced0ae3 -r 9cb95f21979d libpurple/blist.c --- a/libpurple/blist.c Mon May 04 02:04:10 2009 +0000 +++ b/libpurple/blist.c Mon May 04 02:57:02 2009 +0000 @@ -2720,8 +2720,10 @@ static void purple_blist_node_destroy(PurpleBlistNode *node) { + PurpleBlistUiOps *ui_ops; PurpleBlistNode *child, *next_child; + ui_ops = purple_blist_get_ui_ops(); child = node->child; while (child) { next_child = child->next; @@ -2729,6 +2731,10 @@ child = next_child; } + /* Allow the UI to free data */ + if (ui_ops && ui_ops->remove) + ui_ops->remove(purplebuddylist, node); + if (PURPLE_BLIST_NODE_IS_BUDDY(node)) purple_buddy_destroy((PurpleBuddy*)node); else if (PURPLE_BLIST_NODE_IS_CHAT(node)) @@ -3049,6 +3055,10 @@ { PurpleBlistNode *node, *next_node; + /* This happens if we quit before purple_set_blist is called. */ + if (purplebuddylist == NULL) + return; + if (save_timer != 0) { purple_timeout_remove(save_timer); save_timer = 0; diff -r 0cc77ced0ae3 -r 9cb95f21979d libpurple/protocols/jabber/caps.c --- a/libpurple/protocols/jabber/caps.c Mon May 04 02:04:10 2009 +0000 +++ b/libpurple/protocols/jabber/caps.c Mon May 04 02:57:02 2009 +0000 @@ -132,7 +132,11 @@ } free_string_glist(info->features); - free_string_glist(info->forms); + + while (info->forms) { + xmlnode_free(info->forms->data); + info->forms = g_list_delete_link(info->forms, info->forms); + } jabber_caps_node_exts_unref(info->exts);