pidgin: 21280175: Fix some leaks, and simplify these branc...
qulogic at pidgin.im
qulogic at pidgin.im
Fri May 21 18:02:38 EDT 2010
-----------------------------------------------------------------
Revision: 21280175da42b51e30e31b091bb3b4adf7708407
Ancestor: 21770e7623975c57f0e50da6b69b6223e52a4df0
Author: qulogic at pidgin.im
Date: 2010-04-23T20:53:57
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/21280175da42b51e30e31b091bb3b4adf7708407
Modified files:
libpurple/protocols/msn/slp.c
ChangeLog:
Fix some leaks, and simplify these branches.
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/slp.c beb15658cc8302f02bfc52a5fcf7d0ce968bfa76
+++ libpurple/protocols/msn/slp.c ebe00f263437a3cd40b2e493ba049772f6562718
@@ -679,6 +679,8 @@ got_invite(MsnSlpCall *slpcall,
* TCP connection is not supported.
*/
}
+
+ g_free(bridges);
}
else if (!strcmp(type, "application/x-msnmsgr-transrespbody"))
{
@@ -827,6 +829,7 @@ msn_slp_sip_recv(MsnSlpLink *slplink, co
content = get_token(body, "\r\n\r\n", NULL);
+ slpcall = NULL;
if (branch && call_id)
{
slpcall = msn_slplink_find_slp_call(slplink, call_id);
@@ -838,21 +841,12 @@ msn_slp_sip_recv(MsnSlpLink *slplink, co
else if (content_type && content)
{
slpcall = msn_slpcall_new(slplink);
- slpcall->id = call_id;
+ slpcall->id = g_strdup(call_id);
got_invite(slpcall, branch, content_type, content);
}
- else
- {
- g_free(call_id);
- slpcall = NULL;
- }
}
- else
- {
- g_free(call_id);
- slpcall = NULL;
- }
+ g_free(call_id);
g_free(branch);
g_free(content_type);
g_free(content);
More information about the Commits
mailing list