Commit 796fd849 authored by Youness Alaoui's avatar Youness Alaoui

only remove sources that are valid

parent b025bb61
......@@ -245,6 +245,7 @@ socket_close (NiceSocket *sock)
for (i = priv->channels; i; i = i->next) {
ChannelBinding *b = i->data;
if (b->timeout_source)
g_source_remove (b->timeout_source);
g_free (b);
}
......@@ -284,6 +285,8 @@ socket_close (NiceSocket *sock)
g_list_foreach (priv->sent_permissions, (GFunc) nice_address_free, NULL);
g_list_free (priv->sent_permissions);
g_hash_table_destroy (priv->send_data_queues);
if (priv->permission_timeout_source)
g_source_remove (priv->permission_timeout_source);
g_free (priv->current_binding);
......
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