summaryrefslogtreecommitdiffstats
path: root/chardev/char-socket.c
diff options
context:
space:
mode:
authorPeter Maydell2020-07-02 16:54:09 +0200
committerPeter Maydell2020-07-02 16:54:09 +0200
commit64f0ad8ad8e13257e7c912df470d46784b55c3fd (patch)
treeb13ba33035f5f8a059327bd66b175c219f3235c4 /chardev/char-socket.c
parentMerge remote-tracking branch 'remotes/kraxel/tags/vga-20200701-pull-request' ... (diff)
parentmigration/rdma: Plug memory leaks in qemu_rdma_registration_stop() (diff)
downloadqemu-64f0ad8ad8e13257e7c912df470d46784b55c3fd.tar.gz
qemu-64f0ad8ad8e13257e7c912df470d46784b55c3fd.tar.xz
qemu-64f0ad8ad8e13257e7c912df470d46784b55c3fd.zip
Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2020-07-02' into staging
Error reporting patches patches for 2020-07-02 # gpg: Signature made Thu 02 Jul 2020 10:55:48 BST # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-error-2020-07-02: (28 commits) migration/rdma: Plug memory leaks in qemu_rdma_registration_stop() arm/{bcm2835,fsl-imx25,fsl-imx6}: Fix realize error API violations hw/arm/armsse: Fix armsse_realize() error API violation aspeed: Fix realize error API violation arm/stm32f205 arm/stm32f405: Fix realize error API violation amd_iommu: Fix amdvi_realize() error API violation x86: Fix x86_cpu_new() error handling mips/cps: Fix mips_cps_realize() error API violations riscv_hart: Fix riscv_harts_realize() error API violations riscv/sifive_u: Fix sifive_u_soc_realize() error API violations hw/arm: Drop useless object_property_set_link() error handling hw: Fix error API violation around object_property_set_link() qdev: Drop qbus_set_hotplug_handler() parameter @errp qdev: Drop qbus_set_bus_hotplug_handler() parameter @errp aspeed: Clean up roundabout error propagation vnc: Plug minor memory leak in vnc_display_open() test-util-filemonitor: Plug unlikely memory leak sd/milkymist-memcard: Plug minor memory leak in realize qga: Plug unlikely memory leak in guest-set-memory-blocks spapr: Plug minor memory leak in spapr_machine_init() ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'chardev/char-socket.c')
-rw-r--r--chardev/char-socket.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/chardev/char-socket.c b/chardev/char-socket.c
index afebeec5c3..5758d9900f 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);
}
@@ -815,22 +817,20 @@ static void tcp_chr_tls_init(Chardev *chr)
{
SocketChardev *s = SOCKET_CHARDEV(chr);
QIOChannelTLS *tioc;
- Error *err = NULL;
gchar *name;
if (s->is_listen) {
tioc = qio_channel_tls_new_server(
s->ioc, s->tls_creds,
s->tls_authz,
- &err);
+ NULL);
} else {
tioc = qio_channel_tls_new_client(
s->ioc, s->tls_creds,
s->addr->u.inet.host,
- &err);
+ NULL);
}
if (tioc == NULL) {
- error_free(err);
tcp_chr_disconnect(chr);
return;
}
@@ -1086,7 +1086,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;
}