Commit e5e77b67 authored by Philip Withnall's avatar Philip Withnall

socket: Close base socket for a TCP passive socket when closing parent

Summary:
Otherwise the base socket will leak. Spotted by Vadim Genkin.

https://phabricator.freedesktop.org/T125

Maniphest Tasks: T125

Reviewers: ocrete

Projects: #libnice

Reviewed By: ocrete

Subscribers: vadimgenkin

Differential Revision: https://phabricator.freedesktop.org/D228
parents 6835e7b7 a2e25cf4
......@@ -176,6 +176,12 @@ socket_close (NiceSocket *sock)
{
TcpPassivePriv *priv = sock->priv;
if (sock->fileno != NULL) {
g_socket_close (sock->fileno, NULL);
g_object_unref (sock->fileno);
sock->fileno = NULL;
}
if (priv->context)
g_main_context_unref (priv->context);
g_hash_table_unref (priv->connections);
......
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