加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-Fix-memleak-when-process-policies.patch 935 Bytes
一键复制 编辑 原始数据 按行查看 历史
hugel 提交于 2024-11-26 11:13 . sync patches from upstream
From 937e725626eecad2e0c34463e733ae123ba2ff5e Mon Sep 17 00:00:00 2001
From: xujing <xujing125@huawei.com>
Date: Thu, 12 Sep 2024 20:52:30 +0800
Subject: [PATCH] Fix memleak when process policies
Conflict:NA
Reference:https://github.com/rpm-software-management/rpm/commit/937e725626eecad2e0c34463e733ae123ba2ff5e
---
build/policies.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/build/policies.c b/build/policies.c
index 5d704c0eb..69062ee6a 100644
--- a/build/policies.c
+++ b/build/policies.c
@@ -289,6 +289,7 @@ static rpmRC processPolicies(rpmSpec spec, Package pkg, int test)
mod = freeModule(mod);
name = _free(name);
types = _free(types);
+ optCon = poptFreeContext(optCon);
}
rc = RPMRC_OK;
@@ -297,6 +298,7 @@ static rpmRC processPolicies(rpmSpec spec, Package pkg, int test)
freeModule(mod);
free(name);
free(types);
+ poptFreeContext(optCon);
return rc;
}
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化