aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-03-17 13:28:02 +0400
committerGerd Hoffmann <kraxel@redhat.com>2017-03-20 09:07:34 +0100
commit7bc4f0846f5e15dad5a54490290241243b5a4416 (patch)
treeeee751e5322ef0d4ae97ba736c6c4e70613432a2 /ui
parentf019722cbbb45aea153294fc8921fcc96a4d3fa2 (diff)
vnc: fix a qio-channel leak
Spotted by ASAN. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20170317092802.17973-1-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/vnc.c1
1 files changed, 1 insertions, 0 deletions
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;