[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 36/53] chardev/tcp: fix error message double free error
From: |
Paolo Bonzini |
Subject: |
[PULL 36/53] chardev/tcp: fix error message double free error |
Date: |
Mon, 6 Jul 2020 12:41:38 -0400 |
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.
Signed-off-by: lichun <lichun@ruijie.com.cn>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200621213017.17978-1-lichun@ruijie.com.cn>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.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 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.26.2
- [PULL 49/53] target/i386/kvm: Simplify kvm_get_mce_cap_supported(), (continued)
- [PULL 49/53] target/i386/kvm: Simplify kvm_get_mce_cap_supported(), Paolo Bonzini, 2020/07/06
- [PULL 53/53] scripts: improve message when TAP based tests fail, Paolo Bonzini, 2020/07/06
- [PULL 46/53] accel/kvm: Simplify kvm_check_extension(), Paolo Bonzini, 2020/07/06
- [PULL 47/53] accel/kvm: Simplify kvm_check_extension_list(), Paolo Bonzini, 2020/07/06
- [PULL 45/53] accel/kvm: Let kvm_check_extension use global KVM state, Paolo Bonzini, 2020/07/06
- [PULL 28/53] Makefile: simplify MINIKCONF rules, Paolo Bonzini, 2020/07/06
[PULL 36/53] chardev/tcp: fix error message double free error,
Paolo Bonzini <=
[PULL 48/53] target/i386/kvm: Simplify get_para_features(), Paolo Bonzini, 2020/07/06
[PULL 44/53] softmmu/vl: Remove the check for colons in -accel parameters, Paolo Bonzini, 2020/07/06
[PULL 52/53] target/i386: Enable TSX Suspend Load Address Tracking feature, Paolo Bonzini, 2020/07/06
[PULL 51/53] target/i386: Add SERIALIZE cpu feature, Paolo Bonzini, 2020/07/06
[PULL 34/53] iscsi: handle check condition status in retry loop, Paolo Bonzini, 2020/07/06
[PULL 50/53] target/i386/kvm: Simplify kvm_get_supported_[feature]_msrs(), Paolo Bonzini, 2020/07/06
[PULL 42/53] cpu-throttle: new module, extracted from cpus.c, Paolo Bonzini, 2020/07/06
[PULL 43/53] cpu-timers, icount: new modules, Paolo Bonzini, 2020/07/06
[PULL 39/53] cpus: Move CPU code from exec.c to cpus-common.c, Paolo Bonzini, 2020/07/06
Re: [PULL 00/53] Misc patches for QEMU 5.1 soft freeze, no-reply, 2020/07/06