Mercurial > pidgin.yaz
diff libpurple/protocols/msn/oim.c @ 22808:f62a4a7fe365
Fix a number of leaks. As far as I can tell, MSNP14 now logs in without
leaking.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Sat, 03 May 2008 23:51:43 +0000 |
parents | 7d3b2c023ad8 |
children | 9b7af052fd6a |
line wrap: on
line diff
--- a/libpurple/protocols/msn/oim.c Sat May 03 21:03:13 2008 +0000 +++ b/libpurple/protocols/msn/oim.c Sat May 03 23:51:43 2008 +0000 @@ -58,7 +58,7 @@ oim = g_new0(MsnOim, 1); oim->session = session; - oim->oim_list = NULL; + oim->oim_list = NULL; oim->run_id = rand_guid(); oim->challenge = NULL; oim->send_queue = g_queue_new(); @@ -71,16 +71,18 @@ msn_oim_destroy(MsnOim *oim) { MsnOimSendReq *request; - - purple_debug_info("OIM","destroy the OIM \n"); + + purple_debug_info("OIM", "destroy the OIM %p\n", oim); g_free(oim->run_id); g_free(oim->challenge); - + while((request = g_queue_pop_head(oim->send_queue)) != NULL){ msn_oim_free_send_req(request); } + g_queue_free(oim->send_queue); - + g_list_free(oim->oim_list); + g_free(oim); } @@ -91,7 +93,7 @@ MsnOimSendReq *request; request = g_new0(MsnOimSendReq, 1); - request->from_member =g_strdup(from_member); + request->from_member = g_strdup(from_member); request->friendname = g_strdup(friendname); request->to_member = g_strdup(to_member); request->oim_msg = g_strdup(msg); @@ -472,7 +474,7 @@ xmlnode *iu_node; MsnSession *session = oim->session; - purple_debug_info("MSNP14:OIM", "%s", xmlmsg); + purple_debug_info("MSNP14:OIM", "%s\n", xmlmsg); node = xmlnode_from_str(xmlmsg, -1); if (strcmp(node->name, "MD") != 0) {