- io: remove io watch if TLS channel is closed during handshake - hw/ssi: Fix Linux driver init issue with xilinx_spi - chardev: report the handshake error - vhost: Drop unused eventfd_add|del hooks - virtio-iommu: use-after-free fix - hw/arm/virt: Check for attempt to use TrustZone with KVM or HVF - hw/rx: rx-gdbsim DTB load address aligned of 16byte - vhost-user: Use correct macro name TARGET_PPC64 - accel/kvm: Make kvm_dirty_ring_reaper_init() void - accel/kvm: Free as when an error occurred Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com>
36 lines
1.1 KiB
Diff
36 lines
1.1 KiB
Diff
From 6ccda2ece6d08b1bf0622109c2a1f3eeca813089 Mon Sep 17 00:00:00 2001
|
|
From: qihao <qihao_yewu@cmss.chinamobile.com>
|
|
Date: Mon, 28 Aug 2023 19:43:06 +0800
|
|
Subject: [PATCH] accel/kvm: Free as when an error occurred
|
|
|
|
cheery-pick from 4625742cd2aeb1400407889a2f7a5b4c75437818
|
|
|
|
An error may occur after s->as is allocated, for example if the
|
|
KVM_CREATE_VM ioctl call fails.
|
|
|
|
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
|
|
Message-id: 20230727073134.134102-6-akihiko.odaki@daynix.com
|
|
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
|
|
[PMM: tweaked commit message]
|
|
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
|
|
Signed-off-by: qihao_yewu <qihao_yewu@cmss.chinamobile.com>
|
|
---
|
|
accel/kvm/kvm-all.c | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
|
|
index 799d993f6c..9c8d3a916e 100644
|
|
--- a/accel/kvm/kvm-all.c
|
|
+++ b/accel/kvm/kvm-all.c
|
|
@@ -2589,6 +2589,7 @@ err:
|
|
if (s->fd != -1) {
|
|
close(s->fd);
|
|
}
|
|
+ g_free(s->as);
|
|
g_free(s->memory_listener.slots);
|
|
|
|
return ret;
|
|
--
|
|
2.41.0.windows.1
|
|
|