Commit f8b097d4 authored by Youness Alaoui's avatar Youness Alaoui

do not unref if it's NULL.

parent 37be7238
......@@ -368,9 +368,12 @@ socket_close (NiceSocket *sock)
#endif
g_queue_foreach (&priv->send_queue, (GFunc) free_to_be_sent, NULL);
g_queue_clear (&priv->send_queue);
g_io_channel_unref (priv->io_channel);
g_source_destroy (priv->io_source);
g_source_unref (priv->io_source);
if (priv->io_channel)
g_io_channel_unref (priv->io_channel);
if (priv->io_source) {
g_source_destroy (priv->io_source);
g_source_unref (priv->io_source);
}
g_slice_free(TurnTcpPriv, sock->priv);
}
......
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