1 Star 0 Fork 71

tzr/libvirt

forked from src-openEuler/libvirt 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
virCapabilitiesHostNUMAInitReal-Free-cpus-properly.patch 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
From 406e6587036e916c9fa5507e5bcb624ae394442d Mon Sep 17 00:00:00 2001
From: Michal Privoznik <mprivozn@redhat.com>
Date: Tue, 4 May 2021 08:21:59 +0200
Subject: [PATCH 054/108] virCapabilitiesHostNUMAInitReal: Free @cpus properly
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The @cpus variable is an array of structs in which each item
contains a virBitmap member. As such it is not enough to just
VIR_FREE() the array - each bitmap has to be freed too.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
(cherry picked from commit 26a24a702c47403effadb355b7e37f7cf5a488db)
---
src/conf/capabilities.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c
index 99b69aebb5..d6ec1f12f4 100644
--- a/src/conf/capabilities.c
+++ b/src/conf/capabilities.c
@@ -1690,6 +1690,7 @@ virCapabilitiesHostNUMAInitReal(virCapsHostNUMAPtr caps)
cleanup:
virBitmapFree(cpumap);
+ virCapabilitiesClearHostNUMACellCPUTopology(cpus, ncpus);
VIR_FREE(cpus);
VIR_FREE(siblings);
VIR_FREE(pageinfo);
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/tom0392/libvirt.git
git@gitee.com:tom0392/libvirt.git
tom0392
libvirt
libvirt
master

搜索帮助