# HG changeset patch # User Daniel Atallah # Date 1192423364 0 # Node ID 128aca651b9a069890e90f2bdc7e1c4659a58c61 # Parent 3c4d37b98c313a26a1c8e26e5b113e804ac885b7# Parent 87742ec493b185599e8c32c7451b092a0a691adf merge of '4ac79800f2efc2dbe9a348189a545b149d6dfb44' and '92060374e73337f24fcb27c372b2c970120b1252' diff -r 87742ec493b1 -r 128aca651b9a libpurple/buddyicon.c --- a/libpurple/buddyicon.c Mon Oct 15 04:29:22 2007 +0000 +++ b/libpurple/buddyicon.c Mon Oct 15 04:42:44 2007 +0000 @@ -505,37 +505,33 @@ purple_buddy_icon_set_data(icon, icon_data, icon_len, checksum); else if (icon_data && icon_len > 0) { - if (icon_data != NULL && icon_len > 0) - { - PurpleBuddyIcon *icon = purple_buddy_icon_new(account, username, icon_data, icon_len, checksum); + PurpleBuddyIcon *icon = purple_buddy_icon_new(account, username, icon_data, icon_len, checksum); - /* purple_buddy_icon_new() calls - * purple_buddy_icon_set_data(), which calls - * purple_buddy_icon_update(), which has the buddy list - * and conversations take references as appropriate. - * This function doesn't return icon, so we can't - * leave a reference dangling. */ - purple_buddy_icon_unref(icon); - } - else + /* purple_buddy_icon_new() calls + * purple_buddy_icon_set_data(), which calls + * purple_buddy_icon_update(), which has the buddy list + * and conversations take references as appropriate. + * This function doesn't return icon, so we can't + * leave a reference dangling. */ + purple_buddy_icon_unref(icon); + } + else + { + /* If the buddy list or a conversation was holding a + * reference, we'd have found the icon in the cache. + * Since we know we're deleting the icon, we only + * need a subset of purple_buddy_icon_update(). */ + + GSList *buddies = purple_find_buddies(account, username); + while (buddies != NULL) { - /* If the buddy list or a conversation was holding a - * reference, we'd have found the icon in the cache. - * Since we know we're deleting the icon, we only - * need a subset of purple_buddy_icon_update(). */ + PurpleBuddy *buddy = (PurpleBuddy *)buddies->data; - GSList *buddies = purple_find_buddies(account, username); - while (buddies != NULL) - { - PurpleBuddy *buddy = (PurpleBuddy *)buddies->data; + unref_filename(purple_blist_node_get_string((PurpleBlistNode *)buddy, "buddy_icon")); + purple_blist_node_remove_setting((PurpleBlistNode *)buddy, "buddy_icon"); + purple_blist_node_remove_setting((PurpleBlistNode *)buddy, "icon_checksum"); - unref_filename(purple_blist_node_get_string((PurpleBlistNode *)buddy, "buddy_icon")); - purple_blist_node_remove_setting((PurpleBlistNode *)buddy, "buddy_icon"); - purple_blist_node_remove_setting((PurpleBlistNode *)buddy, "icon_checksum"); - - buddies = g_slist_delete_link(buddies, buddies); - } - + buddies = g_slist_delete_link(buddies, buddies); } } } diff -r 87742ec493b1 -r 128aca651b9a libpurple/protocols/msn/httpconn.c --- a/libpurple/protocols/msn/httpconn.c Mon Oct 15 04:29:22 2007 +0000 +++ b/libpurple/protocols/msn/httpconn.c Mon Oct 15 04:42:44 2007 +0000 @@ -687,6 +687,17 @@ g_free(httpconn->host); + while (httpconn->queue != NULL) { + MsnHttpQueueData *queue_data; + + queue_data = (MsnHttpQueueData *) httpconn->queue->data; + + httpconn->queue = g_list_remove_link(httpconn->queue, httpconn->queue); + + g_free(queue_data->body); + g_free(queue_data); + } + purple_circ_buffer_destroy(httpconn->tx_buf); if (httpconn->tx_handler > 0) purple_input_remove(httpconn->tx_handler); diff -r 87742ec493b1 -r 128aca651b9a libpurple/protocols/msn/slplink.c --- a/libpurple/protocols/msn/slplink.c Mon Oct 15 04:29:22 2007 +0000 +++ b/libpurple/protocols/msn/slplink.c Mon Oct 15 04:42:44 2007 +0000 @@ -120,6 +120,8 @@ while (slplink->slp_calls != NULL) msn_slp_call_destroy(slplink->slp_calls->data); + g_queue_free(slplink->slp_msg_queue); + session->slplinks = g_list_remove(session->slplinks, slplink); diff -r 87742ec493b1 -r 128aca651b9a libpurple/protocols/msn/switchboard.c --- a/libpurple/protocols/msn/switchboard.c Mon Oct 15 04:29:22 2007 +0000 +++ b/libpurple/protocols/msn/switchboard.c Mon Oct 15 04:42:44 2007 +0000 @@ -108,8 +108,8 @@ g_free(swboard->auth_key); g_free(swboard->session_id); - for (l = swboard->users; l != NULL; l = l->next) - g_free(l->data); + for (; swboard->users; swboard->users = g_list_remove_link(swboard->users, swboard->users)) + g_free(swboard->users->data); session = swboard->session; session->switches = g_list_remove(session->switches, swboard); diff -r 87742ec493b1 -r 128aca651b9a pidgin/gtkconv.c --- a/pidgin/gtkconv.c Mon Oct 15 04:29:22 2007 +0000 +++ b/pidgin/gtkconv.c Mon Oct 15 04:42:44 2007 +0000 @@ -3524,6 +3524,7 @@ if (b == item_buddy) { gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), TRUE); + g_list_free(child); break; } }