1 Star 0 Fork 71

lIshaohui/libvirt

forked from src-openEuler/libvirt 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vahDeinit-Fix-memory-leak.patch 1.09 KB
一键复制 编辑 原始数据 按行查看 历史
From adc93f772bd3552be91ca53cf62bb81e9c6737e2 Mon Sep 17 00:00:00 2001
From: Tim Wiederhake <twiederh@redhat.com>
Date: Thu, 22 Apr 2021 15:07:33 +0200
Subject: [PATCH 051/108] vahDeinit: Fix memory leak
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Calling VIR_FREE on a virDomainDef* does not free its various contained
pointers.
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
(cherry picked from commit 9ac2ca799a48388ac1d3c561b99bfbe039d17cca)
---
src/security/virt-aa-helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
index 8526b7b985..9c9b844146 100644
--- a/src/security/virt-aa-helper.c
+++ b/src/security/virt-aa-helper.c
@@ -78,7 +78,7 @@ vahDeinit(vahControl * ctl)
if (ctl == NULL)
return -1;
- VIR_FREE(ctl->def);
+ virDomainDefFree(ctl->def);
virObjectUnref(ctl->caps);
virObjectUnref(ctl->xmlopt);
VIR_FREE(ctl->files);
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/li-shaohui/libvirt.git
git@gitee.com:li-shaohui/libvirt.git
li-shaohui
libvirt
libvirt
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385