comparison libpurple/protocols/msn/sbconn.c @ 30935:2de522fa534a

Fix a lot more leaks, some old, some new.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sun, 21 Nov 2010 09:56:48 +0000
parents e358e16e527f
children b4285ea42b6e
comparison
equal deleted inserted replaced
30934:4e097dfb7784 30935:2de522fa534a
14 msg = msn_message_new_msnslp(); 14 msg = msn_message_new_msnslp();
15 15
16 passport = purple_normalize(slplink->session->account, slplink->remote_user); 16 passport = purple_normalize(slplink->session->account, slplink->remote_user);
17 msn_message_set_header(msg, "P2P-Dest", passport); 17 msn_message_set_header(msg, "P2P-Dest", passport);
18 18
19 msg->part = msn_slpmsgpart_ref(part);
19 data = msn_slpmsgpart_serialize(part, &size); 20 data = msn_slpmsgpart_serialize(part, &size);
20 msg->part = msn_slpmsgpart_ref(part);
21
22 msn_message_set_bin_data(msg, data, size); 21 msn_message_set_bin_data(msg, data, size);
22 g_free(data);
23 23
24 if (slplink->swboard == NULL) 24 if (slplink->swboard == NULL)
25 { 25 {
26 slplink->swboard = msn_session_get_swboard(slplink->session, 26 slplink->swboard = msn_session_get_swboard(slplink->session,
27 slplink->remote_user, MSN_SB_FLAG_FT); 27 slplink->remote_user, MSN_SB_FLAG_FT);
31 /* If swboard is destroyed we will be too */ 31 /* If swboard is destroyed we will be too */
32 slplink->swboard->slplinks = g_list_prepend(slplink->swboard->slplinks, slplink); 32 slplink->swboard->slplinks = g_list_prepend(slplink->swboard->slplinks, slplink);
33 } 33 }
34 34
35 msn_switchboard_send_msg(slplink->swboard, msg, TRUE); 35 msn_switchboard_send_msg(slplink->swboard, msg, TRUE);
36 msn_message_destroy(msg);
36 } 37 }
37 38
38 /** Called when a message times out. */ 39 /** Called when a message times out. */
39 static void 40 static void
40 msg_timeout(MsnCmdProc *cmdproc, MsnTransaction *trans) 41 msg_timeout(MsnCmdProc *cmdproc, MsnTransaction *trans)