pidgin.vv: dd70abda: Plug memory leak.

maiku at soc.pidgin.im maiku at soc.pidgin.im
Thu Feb 5 05:40:26 EST 2009


-----------------------------------------------------------------
Revision: dd70abdae9f96389afee1f1a67f4d95650e19237
Ancestor: 4316683ac01a13b979533e848b317372eaf61301
Author: maiku at soc.pidgin.im
Date: 2009-02-05T09:41:07
Branch: im.pidgin.pidgin.vv
URL: http://d.pidgin.im/viewmtn/revision/info/dd70abdae9f96389afee1f1a67f4d95650e19237

Modified files:
        libpurple/protocols/jabber/jingle/rtp.c

ChangeLog: 

Plug memory leak.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jingle/rtp.c	55bddce2006e17372b1f84b60b2159a405031cf0
+++ libpurple/protocols/jabber/jingle/rtp.c	cc6b750a1770bb6ecfe325373ba1f5ca462f630f
@@ -189,18 +189,18 @@ jingle_rtp_candidates_to_transport(Jingl
 jingle_rtp_candidates_to_transport(JingleSession *session, GType type, guint generation, GList *candidates)
 {
 	if (type == JINGLE_TYPE_RAWUDP) {
-		gchar *id = jabber_get_next_id(jingle_session_get_js(session));
 		JingleTransport *transport = jingle_transport_create(JINGLE_TRANSPORT_RAWUDP);
 		JingleRawUdpCandidate *rawudp_candidate;
 		for (; candidates; candidates = g_list_next(candidates)) {
 			PurpleMediaCandidate *candidate = candidates->data;
-			id = jabber_get_next_id(jingle_session_get_js(session));
+			gchar *id = jabber_get_next_id(
+					jingle_session_get_js(session));
 			rawudp_candidate = jingle_rawudp_candidate_new(id,
 					generation, candidate->component_id,
 					candidate->ip, candidate->port);
 			jingle_rawudp_add_local_candidate(JINGLE_RAWUDP(transport), rawudp_candidate);
+			g_free(id);
 		}
-		g_free(id);
 		return transport;
 	} else if (type == JINGLE_TYPE_ICEUDP) {
 		JingleTransport *transport = jingle_transport_create(JINGLE_TRANSPORT_ICEUDP);


More information about the Commits mailing list