qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] chardev/tcp: fix error message double free error
@ 2020-06-21 21:30 lichun
  2020-06-25  6:47 ` Markus Armbruster
  2020-07-01  7:06 ` Markus Armbruster
  0 siblings, 2 replies; 9+ messages in thread
From: lichun @ 2020-06-21 21:30 UTC (permalink / raw)
  To: marcandre.lureau; +Cc: pbonzini, lichun, qemu-devel, 706701795

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;
     }
 
-- 
2.18.4



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-07-02  4:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-21 21:30 [PATCH v2] chardev/tcp: fix error message double free error lichun
2020-06-25  6:47 ` Markus Armbruster
2020-06-25  9:25   ` Marc-André Lureau
2020-06-28  2:19     ` lichun
2020-07-01  7:06 ` Markus Armbruster
2020-07-01 13:09   ` Paolo Bonzini
2020-07-01 15:12     ` lichun
2020-07-01 15:14       ` Paolo Bonzini
2020-07-02  4:25     ` Markus Armbruster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).