diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2015-08-29 20:04:03 +0100 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2015-08-29 20:04:03 +0100 |
commit | 1c34734cd105c6cca0ec8bbb908002c4bfb007b3 (patch) | |
tree | 5f75647da3b5f45ed99873a23b18ea330ed2b77c /agent/agent.c | |
parent | dddca10ceff20e3578fc901b9919c3d20f87b7b6 (diff) | |
download | libnice-1c34734cd105c6cca0ec8bbb908002c4bfb007b3.tar.gz |
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
Diffstat (limited to 'agent/agent.c')
-rw-r--r-- | agent/agent.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/agent/agent.c b/agent/agent.c index 77450c3..09945f1 100644 --- a/agent/agent.c +++ b/agent/agent.c @@ -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; } |