qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2] chardev/tcp: fix error message double free error


From: Markus Armbruster
Subject: Re: [PATCH v2] chardev/tcp: fix error message double free error
Date: Thu, 25 Jun 2020 08:47:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

lichun <lichun@ruijie.com.cn> writes:

> Signed-off-by: lichun <lichun@ruijie.com.cn>
> ---
>  chardev/char-socket.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/chardev/char-socket.c b/chardev/char-socket.c
> index afebeec5c3..569d54c144 100644
> --- a/chardev/char-socket.c
> +++ b/chardev/char-socket.c
> @@ -142,6 +142,8 @@ static void check_report_connect_error(Chardev *chr,
>                            "Unable to connect character device %s: ",
>                            chr->label);
>          s->connect_err_reported = true;
> +    } else {
> +        error_free(err);
>      }
>      qemu_chr_socket_restart_timer(chr);
>  }
> @@ -1086,7 +1088,6 @@ static void qemu_chr_socket_connected(QIOTask *task, 
> void *opaque)
>      if (qio_task_propagate_error(task, &err)) {
>          tcp_chr_change_state(s, TCP_CHARDEV_STATE_DISCONNECTED);
>          check_report_connect_error(chr, err);
> -        error_free(err);
>          goto cleanup;
>      }

Since my "Error handling fixes & cleanups" series fixes similar errors.
I'm happy to merge this patch along with it.  Up to Marc-André.




reply via email to

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