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>
This commit is contained in:
Marc-André Lureau 2017-03-17 13:28:02 +04:00 committed by Gerd Hoffmann
parent f019722cbb
commit 7bc4f0846f
1 changed files with 1 additions and 0 deletions

View File

@ -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;