Commit 2471c0e7 authored by Youness Alaoui's avatar Youness Alaoui

Correctly free whatever we created

parent d7bc5d45
...@@ -619,12 +619,27 @@ static void ...@@ -619,12 +619,27 @@ static void
socket_close (NiceSocket *sock) socket_close (NiceSocket *sock)
{ {
turn_priv *priv = (turn_priv *) sock->priv; turn_priv *priv = (turn_priv *) sock->priv;
GList *i = priv->channels; GList *i = NULL;
for (; i; i = i->next) { for (i = priv->channels; i; i = i->next) {
ChannelBinding *b = i->data; ChannelBinding *b = i->data;
g_free (b); g_free (b);
} }
g_list_free (priv->channels); g_list_free (priv->channels);
for (i = priv->pending_bindings; i; i = i->next) {
ChannelBinding *b = i->data;
g_free (b);
}
g_list_free (priv->pending_bindings);
if (priv->tick_source != NULL) {
g_source_destroy (priv->tick_source);
g_source_unref (priv->tick_source);
priv->tick_source = NULL;
}
g_free (priv->current_binding);
g_free (priv->current_binding_msg);
g_free (priv->username); g_free (priv->username);
g_free (priv->password); g_free (priv->password);
g_free (priv); g_free (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