From b8f0eede60ed1018da7cc3d231f861ed64d1da0f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Olivier=20Cr=C3=AAte?= Date: Mon, 11 Aug 2014 14:27:40 -0400 Subject: [PATCH] outputstream: Fix ref leak --- agent/outputstream.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/agent/outputstream.c b/agent/outputstream.c index 2062421..4de37dc 100644 --- a/agent/outputstream.c +++ b/agent/outputstream.c @@ -535,10 +535,10 @@ nice_output_stream_write_nonblocking (GPollableOutputStream *stream, if (count == 0) { g_object_unref (agent); - return 0; + n_sent = 0; + goto done; } - n_sent = nice_agent_send (agent, priv->stream_id, priv->component_id, count, buffer); @@ -546,7 +546,7 @@ nice_output_stream_write_nonblocking (GPollableOutputStream *stream, g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK, g_strerror (EAGAIN)); - + done: g_object_unref (agent); -- 2.7.4