Commit 3e3a2b62 authored by Fabrice Bellet's avatar Fabrice Bellet Committed by Olivier Crête

agent: avoid leak of turn refreshes

We keep refreshes having the discarding flag set. They may be freed later
if the agent main context remains alive after agent deletion.
parent bbf7f2d7
......@@ -5629,6 +5629,15 @@ nice_agent_dispose (GObject *object)
"using nice_agent_close_async() to prune them before releasing the "
"agent.", agent);
for (i = agent->refresh_list; i;) {
GSList *next = i->next;
CandidateRefresh *refresh = i->data;
if (!refresh->disposing)
refresh_free (agent, refresh);
i = next;
}
g_free (agent->stun_server_ip);
agent->stun_server_ip = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment