From: Philip Withnall Date: Wed, 5 Mar 2014 10:45:00 +0000 (+0000) Subject: agent: Ensure the pending signal queue is cleared on dispose X-Git-Tag: 0.1.5~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92d62e4b139e3cae01e0b8c33b5149bb948823d2;p=platform%2Fupstream%2Flibnice.git agent: Ensure the pending signal queue is cleared on dispose --- diff --git a/agent/agent.c b/agent/agent.c index 3c22959..d026bc5 100644 --- a/agent/agent.c +++ b/agent/agent.c @@ -3649,6 +3649,7 @@ static void nice_agent_dispose (GObject *object) { GSList *i; + QueuedSignal *sig; NiceAgent *agent = NICE_AGENT (object); /* step: free resources for the binding discovery timers */ @@ -3682,6 +3683,10 @@ nice_agent_dispose (GObject *object) g_slist_free (agent->streams); agent->streams = NULL; + while ((sig = g_queue_pop_head (&agent->pending_signals))) { + free_queued_signal (sig); + } + g_free (agent->stun_server_ip); agent->stun_server_ip = NULL;