qemu/io
Markus Armbruster fdceb4ab4d io: Fix qio_channel_socket_close() error handling
The Error ** argument must be NULL, &error_abort, &error_fatal, or a
pointer to a variable containing NULL.  Passing an argument of the
latter kind twice without clearing it in between is wrong: if the
first call sets an error, it no longer points to NULL for the second
call.

qio_channel_socket_close() passes @errp first to
socket_listen_cleanup(), and then, if closesocket() fails, to
error_setg_errno().  If socket_listen_cleanup() failed, this will trip
the assertion in error_setv().

Fix by ignoring a second error.

Fixes: 73564c407c
Cc: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20200422130719.28225-11-armbru@redhat.com>
2020-04-29 08:01:52 +02:00
..
channel-buffer.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
channel-command.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
channel-file.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
channel-socket.c io: Fix qio_channel_socket_close() error handling 2020-04-29 08:01:52 +02:00
channel-tls.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
channel-util.c sockets: move fd_is_socket() into common sockets code 2018-03-13 18:06:06 +00:00
channel-watch.c
channel-websock.c io/channel-websock: treat 'binary' and no sub-protocol as the same 2020-02-07 12:22:18 +00:00
channel.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
dns-resolver.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
Makefile.objs io: introduce a network socket listener API 2017-12-15 15:07:26 +00:00
net-listener.c socket: Add num connections to qio_net_listener_open_sync() 2019-09-03 23:24:42 +02:00
task.c main-loop: Fix GSource leak in qio_task_thread_worker() 2019-08-21 16:31:58 +02:00
trace-events socket: Add num connections to qio_channel_socket_async() 2019-09-03 23:24:42 +02:00