# HG changeset patch # User Stu Tomlinson # Date 1133113637 0 # Node ID 2cfd36ba0f455774bf36ffe397d7cb39b9b9b4f0 # Parent 62bed9e1bce00f91b54fe2f4affbc238af276264 [gaim-migrate @ 14538] Richard pointed out we shouldn't be unref()ing here, and valgrind confirmed it. I left myself a note so I don't do silly things again. committer: Tailor Script diff -r 62bed9e1bce0 -r 2cfd36ba0f45 src/protocols/msn/switchboard.c --- a/src/protocols/msn/switchboard.c Sun Nov 27 17:38:19 2005 +0000 +++ b/src/protocols/msn/switchboard.c Sun Nov 27 17:47:17 2005 +0000 @@ -99,12 +99,10 @@ g_queue_free(swboard->msg_queue); - while((l = swboard->ack_list) != NULL) - { - msg = l->data; - msg_error_helper(swboard->cmdproc, msg, MSN_MSG_ERROR_SB); - msn_message_unref(msg); - } + /* msg_error_helper will both remove the msg from ack_list and + unref it, so we don't need to do either here */ + while ((l = swboard->ack_list) != NULL) + msg_error_helper(swboard->cmdproc, l->data, MSN_MSG_ERROR_SB); if (swboard->im_user != NULL) g_free(swboard->im_user);