代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/libvirt 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From d1c3b60ebbfe0fad5372cf2940b366f00548a4fe Mon Sep 17 00:00:00 2001
From: tangbinzy <tangbin_yewu@cmss.chinamobile.com>
Date: Wed, 23 Nov 2022 10:00:57 +0000
Subject: [PATCH 07/23] qemu: fix memleak in qemuDomainAttachDeviceLive()
During disk hot plugging, qemuDomainAttachDeviceLive() adds the new disk to
the device list of the VM object. However, hot plugging cdroms and floppies
only updates the src variable of the original disk device, so the newly
generated disk object needs to be freed.
Signed-off-by: Jin Yan <jinyan12@huawei.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: tangbin <tangbin_yewu@cmss.chinamobile.com>
(cherry-pick from 2f470a4fb1edbe2da702e398314b9db201bb991e)
---
src/qemu/qemu_hotplug.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index d7bcb6a99f..c9347bac04 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1115,6 +1115,7 @@ qemuDomainAttachDeviceDiskLive(virQEMUDriverPtr driver,
return -1;
disk->src = NULL;
+ virDomainDiskDefFree(disk);
return 0;
}
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。