Commit 03d11b49 authored by Philip Withnall's avatar Philip Withnall

Fix agent leak in case component socket is reset remotely

Summary: The patch fixes the issue where agent reference count is not properly decremented causing instance leak in cases where component's socket is reset remotely.

Reviewers: #libnice, pwithnall

Projects: #libnice

Reviewed By: #libnice, pwithnall

Subscribers: pwithnall, maximgolunov

Differential Revision: https://phabricator.freedesktop.org/D236
parents dddca10c 1c34734c
......@@ -1700,7 +1700,6 @@ pseudo_tcp_socket_readable (PseudoTcpSocket *sock, gpointer user_data)
out:
g_object_unref (agent);
}
static void
......@@ -4775,6 +4774,7 @@ component_io_cb (GSocket *gsocket, GIOCondition condition, gpointer user_data)
component_detach_socket (component, socket_source->socket);
agent_unlock ();
g_object_unref (agent);
return G_SOURCE_REMOVE;
}
......@@ -4945,6 +4945,7 @@ done:
out:
g_object_unref (agent);
agent_unlock_and_emit (agent);
return G_SOURCE_REMOVE;
}
......
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