From: Marc-André Lureau <marcandre.lur...@redhat.com>

Spotted by ASAN.

Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com>
Reviewed-by: Daniel P. Berrange <berra...@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org>
Message-id: 20170317092802.17973-1-marcandre.lur...@redhat.com
Signed-off-by: Gerd Hoffmann <kra...@redhat.com>
---
 ui/vnc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ui/vnc.c b/ui/vnc.c
index 8bfb1e0..6e93b88 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;
-- 
1.8.3.1


Reply via email to