Commit 77c1e1ed authored by Philip Withnall's avatar Philip Withnall

agent: Warn if a Component is freed without first being closed

parent 8d14a623
......@@ -279,6 +279,11 @@ component_close (Component *cmp)
void
component_free (Component *cmp)
{
/* Component should have been closed already. */
g_warn_if_fail (cmp->local_candidates == NULL);
g_warn_if_fail (cmp->remote_candidates == NULL);
g_warn_if_fail (cmp->incoming_checks == NULL);
g_clear_object (&cmp->tcp);
g_clear_object (&cmp->stop_cancellable);
g_clear_object (&cmp->iostream);
......
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