1 Star 0 Fork 76

gys/rpm

forked from src-openEuler/rpm 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-Fix-memleak-when-running-generate_buildrequires.patch 694 Bytes
一键复制 编辑 原始数据 按行查看 历史
From 3b0b9d491f5828a40c15b76b4a19ca00006cf81e Mon Sep 17 00:00:00 2001
From: xujing <xujing125@huawei.com>
Date: Mon, 28 Nov 2022 11:02:47 +0800
Subject: [PATCH 5/5] Fix memleak when running %generate_buildrequires
The "output[i]" is alloced in argvSplit but not freed when running
%generate_buildrequires. Fix it.
---
build/build.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build/build.c b/build/build.c
index 4437f6c9c..34e01d5be 100644
--- a/build/build.c
+++ b/build/build.c
@@ -279,7 +279,7 @@ static int doBuildRequires(rpmSpec spec, int test)
exit:
freeStringBuf(sb_stdout);
- free(output);
+ argvFree(output);
return rc;
}
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gys66/rpm.git
git@gitee.com:gys66/rpm.git
gys66
rpm
rpm
master

搜索帮助