From 7bc4f0846f5e15dad5a54490290241243b5a4416 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Fri, 17 Mar 2017 13:28:02 +0400 Subject: vnc: fix a qio-channel leak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Spotted by ASAN. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrange Reviewed-by: Philippe Mathieu-Daudé Message-id: 20170317092802.17973-1-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- ui/vnc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/vnc.c b/ui/vnc.c index 8bfb1e0685..6e93b883b5 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3677,6 +3677,7 @@ static int vnc_display_listen_addr(VncDisplay *vd, qio_channel_set_name(QIO_CHANNEL(sioc), name); if (qio_channel_socket_listen_sync( sioc, rawaddrs[i], listenerr == NULL ? &listenerr : NULL) < 0) { + object_unref(OBJECT(sioc)); continue; } listening = true; -- cgit v1.2.3