Mercurial > pidgin
diff 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 |
line wrap: on
line diff
--- a/libpurple/protocols/msn/switchboard.c Thu Oct 18 18:13:30 2007 +0000 +++ b/libpurple/protocols/msn/switchboard.c Thu Oct 18 20:20:57 2007 +0000 @@ -108,7 +108,7 @@ g_free(swboard->auth_key); g_free(swboard->session_id); - for (; swboard->users; swboard->users = g_list_remove_link(swboard->users, swboard->users)) + for (; swboard->users; swboard->users = g_list_delete_link(swboard->users, swboard->users)) g_free(swboard->users->data); session = swboard->session; @@ -735,10 +735,9 @@ msn_message_show_readable(msg, "SB RECV", FALSE); #endif - if (msg->remote_user != NULL) - g_free (msg->remote_user); + g_free (msg->remote_user); + msg->remote_user = g_strdup(cmd->params[0]); - msg->remote_user = g_strdup(cmd->params[0]); msn_cmdproc_process_msg(cmdproc, msg); msn_message_destroy(msg);
