comparison libpurple/protocols/msn/switchboard.c @ 20987:0cbfc19e4909

Fix some leaks caused by misuse of g_list_remove_link() instead of g_list_delete_link().
author Daniel Atallah <daniel.atallah@gmail.com>
date Thu, 18 Oct 2007 20:20:57 +0000
parents 2c039a40babc
children c8f99cb61dc9
comparison
equal deleted inserted replaced
20986:12753bdeaf47 20987:0cbfc19e4909
106 106
107 g_free(swboard->im_user); 107 g_free(swboard->im_user);
108 g_free(swboard->auth_key); 108 g_free(swboard->auth_key);
109 g_free(swboard->session_id); 109 g_free(swboard->session_id);
110 110
111 for (; swboard->users; swboard->users = g_list_remove_link(swboard->users, swboard->users)) 111 for (; swboard->users; swboard->users = g_list_delete_link(swboard->users, swboard->users))
112 g_free(swboard->users->data); 112 g_free(swboard->users->data);
113 113
114 session = swboard->session; 114 session = swboard->session;
115 session->switches = g_list_remove(session->switches, swboard); 115 session->switches = g_list_remove(session->switches, swboard);
116 116
733 MSG_LINE_DEM,MSG_BODY_DEM); 733 MSG_LINE_DEM,MSG_BODY_DEM);
734 #ifdef MSN_DEBUG_SB 734 #ifdef MSN_DEBUG_SB
735 msn_message_show_readable(msg, "SB RECV", FALSE); 735 msn_message_show_readable(msg, "SB RECV", FALSE);
736 #endif 736 #endif
737 737
738 if (msg->remote_user != NULL) 738 g_free (msg->remote_user);
739 g_free (msg->remote_user);
740
741 msg->remote_user = g_strdup(cmd->params[0]); 739 msg->remote_user = g_strdup(cmd->params[0]);
740
742 msn_cmdproc_process_msg(cmdproc, msg); 741 msn_cmdproc_process_msg(cmdproc, msg);
743 742
744 msn_message_destroy(msg); 743 msn_message_destroy(msg);
745 } 744 }
746 745