Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
libnice
libnice
Commits
3d5cf929
Commit
3d5cf929
authored
Jan 19, 2011
by
Youness Alaoui
Browse files
Make sure that we revert/free the candidates gathered before an error occured if we can't gather
parent
5d3c509b
Changes
1
Hide whitespace changes
Inline
Side-by-side
agent/agent.c
View file @
3d5cf929
...
...
@@ -1871,6 +1871,20 @@ nice_agent_gather_candidates (
nice_address_free
(
i
->
data
);
g_slist_free
(
local_addresses
);
if
(
ret
==
FALSE
)
{
priv_free_upnp
(
agent
);
for
(
n
=
0
;
n
<
stream
->
n_components
;
n
++
)
{
Component
*
component
=
stream_find_component_by_id
(
stream
,
n
+
1
);
for
(
i
=
component
->
local_candidates
;
i
;
i
=
i
->
next
)
{
NiceCandidate
*
candidate
=
i
->
data
;
nice_candidate_free
(
candidate
);
}
g_slist_free
(
component
->
local_candidates
);
component
->
local_candidates
=
NULL
;
}
discovery_prune_stream
(
agent
,
stream_id
);
}
agent_unlock
();
return
ret
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment