[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 41/77] chardev/tcp: Fix error message double free error
From: |
Michael Roth |
Subject: |
[PATCH 41/77] chardev/tcp: Fix error message double free error |
Date: |
Thu, 3 Sep 2020 15:58:59 -0500 |
From: lichun <lichun@ruijie.com.cn>
Errors are already freed by error_report_err, so we only need to call
error_free when that function is not called.
Cc: qemu-stable@nongnu.org
Signed-off-by: lichun <lichun@ruijie.com.cn>
Message-Id: <20200621213017.17978-1-lichun@ruijie.com.cn>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Commit message improved, cc: qemu-stable]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
(cherry picked from commit ed4e0d2ef140aef255d67eec30767e5fcd949f58)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
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 e5ee685f8c..58917870cd 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);
}
@@ -1083,7 +1085,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.17.1
- [PATCH 32/77] acpi: accept byte and word access to core ACPI registers, (continued)
- [PATCH 32/77] acpi: accept byte and word access to core ACPI registers, Michael Roth, 2020/09/03
- [PATCH 39/77] usb/dev-mtp: Fix Error double free after inotify failure, Michael Roth, 2020/09/03
- [PATCH 33/77] hw/display/artist: Unbreak size mismatch memory accesses, Michael Roth, 2020/09/03
- [PATCH 40/77] nbd: Avoid off-by-one in long export name truncation, Michael Roth, 2020/09/03
- [PATCH 34/77] hw/net/e1000e: Do not abort() on invalid PSRCTL register value, Michael Roth, 2020/09/03
- [PATCH 35/77] virtiofsd: Whitelist fchmod, Michael Roth, 2020/09/03
- [PATCH 38/77] error: Use error_reportf_err() where appropriate, Michael Roth, 2020/09/03
- [PATCH 36/77] hw/audio/gus: Fix registers 32-bit access, Michael Roth, 2020/09/03
- [PATCH 37/77] net/virtio: Fix failover_replug_primary() return value regression, Michael Roth, 2020/09/03
- [PATCH 03/77] qemu-nbd: Close inherited stderr, Michael Roth, 2020/09/03
- [PATCH 41/77] chardev/tcp: Fix error message double free error,
Michael Roth <=
- [PATCH 43/77] util: Introduce qemu_get_host_name(), Michael Roth, 2020/09/03
- [PATCH 42/77] qga: fix assert regression on guest-shutdown, Michael Roth, 2020/09/03
- [PATCH 44/77] qga: Use qemu_get_host_name() instead of g_get_host_name(), Michael Roth, 2020/09/03
- [PATCH 45/77] docs/orangepi: Add instructions for resizing SD image to power of two, Michael Roth, 2020/09/03
- [PATCH 46/77] tests/acceptance/boot_linux: Tag tests using a SD card with 'device:sd', Michael Roth, 2020/09/03
- [PATCH 50/77] tests/acceptance/boot_linux: Expand SD card image to power of 2, Michael Roth, 2020/09/03
- [PATCH 47/77] tests/acceptance: allow console interaction with specific VMs, Michael Roth, 2020/09/03
- [PATCH 04/77] 9p: Lock directory streams with a CoMutex, Michael Roth, 2020/09/03
- [PATCH 48/77] tests/acceptance: refactor boot_linux to allow code reuse, Michael Roth, 2020/09/03
- [PATCH 49/77] tests/acceptance: refactor boot_linux_console test to allow code reuse, Michael Roth, 2020/09/03