qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 10/11] io: Fix qio_channel_socket_close() error handling


From: Daniel P . Berrangé
Subject: Re: [PATCH 10/11] io: Fix qio_channel_socket_close() error handling
Date: Mon, 20 Apr 2020 10:34:07 +0100
User-agent: Mutt/1.13.3 (2020-01-12)

On Mon, Apr 20, 2020 at 10:32:35AM +0200, Markus Armbruster wrote:
> 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: 73564c407caedf992a1c688b5fea776a8b56ba2a
> Cc: Daniel P. Berrangé <address@hidden>
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
>  io/channel-socket.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Reviewed-by: Daniel P. Berrangé <address@hidden>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

[Prev in Thread] Current Thread [Next in Thread]