1 Star 0 Fork 78

zhoushuiqing/rpm

forked from src-openEuler/rpm 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-Fix-BANames-leak-in-handlePreambleTag.patch 786 Bytes
一键复制 编辑 原始数据 按行查看 历史
From 7fcdfd3b40f69af6a1d4980683859eef05f39b4e Mon Sep 17 00:00:00 2001
From: xujing <xujing125@huawei.com>
Date: Fri, 25 Nov 2022 16:48:34 +0800
Subject: [PATCH 1/5] Fix BANames leak in handlePreambleTag
The "BANames" is alloced from popParseArgvString but not freed
when spec->packages != pkg. Fix it.
---
build/parsePreamble.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/build/parsePreamble.c b/build/parsePreamble.c
index 119551cf6..c4d137cf7 100644
--- a/build/parsePreamble.c
+++ b/build/parsePreamble.c
@@ -961,6 +961,7 @@ static rpmRC handlePreambleTag(rpmSpec spec, Package pkg, rpmTagVal tag,
BANames = _free(BANames);
goto exit;
}
+ BANames = _free(BANames);
headerPutString(pkg->header, RPMTAG_ARCH, "noarch");
}
if (!BACount)
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ZhouShuiQing/rpm.git
git@gitee.com:ZhouShuiQing/rpm.git
ZhouShuiQing
rpm
rpm
master

搜索帮助