Mercurial > pidgin
comparison libpurple/protocols/jabber/jingle/rtp.c @ 26098:4a245ffb4051
Plug memory leak.
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Thu, 05 Feb 2009 09:41:07 +0000 |
parents | 84ea07648377 |
children | 836f2e0b3b22 |
comparison
equal
deleted
inserted
replaced
26097:84ea07648377 | 26098:4a245ffb4051 |
---|---|
187 | 187 |
188 static JingleTransport * | 188 static JingleTransport * |
189 jingle_rtp_candidates_to_transport(JingleSession *session, GType type, guint generation, GList *candidates) | 189 jingle_rtp_candidates_to_transport(JingleSession *session, GType type, guint generation, GList *candidates) |
190 { | 190 { |
191 if (type == JINGLE_TYPE_RAWUDP) { | 191 if (type == JINGLE_TYPE_RAWUDP) { |
192 gchar *id = jabber_get_next_id(jingle_session_get_js(session)); | |
193 JingleTransport *transport = jingle_transport_create(JINGLE_TRANSPORT_RAWUDP); | 192 JingleTransport *transport = jingle_transport_create(JINGLE_TRANSPORT_RAWUDP); |
194 JingleRawUdpCandidate *rawudp_candidate; | 193 JingleRawUdpCandidate *rawudp_candidate; |
195 for (; candidates; candidates = g_list_next(candidates)) { | 194 for (; candidates; candidates = g_list_next(candidates)) { |
196 PurpleMediaCandidate *candidate = candidates->data; | 195 PurpleMediaCandidate *candidate = candidates->data; |
197 id = jabber_get_next_id(jingle_session_get_js(session)); | 196 gchar *id = jabber_get_next_id( |
197 jingle_session_get_js(session)); | |
198 rawudp_candidate = jingle_rawudp_candidate_new(id, | 198 rawudp_candidate = jingle_rawudp_candidate_new(id, |
199 generation, candidate->component_id, | 199 generation, candidate->component_id, |
200 candidate->ip, candidate->port); | 200 candidate->ip, candidate->port); |
201 jingle_rawudp_add_local_candidate(JINGLE_RAWUDP(transport), rawudp_candidate); | 201 jingle_rawudp_add_local_candidate(JINGLE_RAWUDP(transport), rawudp_candidate); |
202 } | 202 g_free(id); |
203 g_free(id); | 203 } |
204 return transport; | 204 return transport; |
205 } else if (type == JINGLE_TYPE_ICEUDP) { | 205 } else if (type == JINGLE_TYPE_ICEUDP) { |
206 JingleTransport *transport = jingle_transport_create(JINGLE_TRANSPORT_ICEUDP); | 206 JingleTransport *transport = jingle_transport_create(JINGLE_TRANSPORT_ICEUDP); |
207 JingleIceUdpCandidate *iceudp_candidate; | 207 JingleIceUdpCandidate *iceudp_candidate; |
208 for (; candidates; candidates = g_list_next(candidates)) { | 208 for (; candidates; candidates = g_list_next(candidates)) { |