1 Star 0 Fork 79

zhoushuiqing/rpm

forked from src-openEuler/rpm 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-Fix-Header-leak-when-running-rpm2cpio.patch 814 Bytes
一键复制 编辑 原始数据 按行查看 历史
From cf27c6f4963dcf27302d0f4fa39d7787dd03f942 Mon Sep 17 00:00:00 2001
From: xujing <xujing125@huawei.com>
Date: Fri, 25 Nov 2022 17:18:33 +0800
Subject: [PATCH] Fix Header leak when running rpm2cpio
Header "h" is alloced in rpmReadPackageFile but not freed when
running rpm2cpio. Fix it. Remove redundant whitespace between
the Fclose()'s too while at it for logical cleanup grouping.
---
rpm2cpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rpm2cpio.c b/rpm2cpio.c
index fcc3b3079..940d6ce38 100644
--- a/rpm2cpio.c
+++ b/rpm2cpio.c
@@ -96,8 +96,8 @@ int main(int argc, char *argv[])
*/
rc = (ufdCopy(gzdi, fdo) >= payload_size) ? EXIT_SUCCESS : EXIT_FAILURE;
+ headerFree(h);
Fclose(fdo);
-
Fclose(gzdi); /* XXX gzdi == fdi */
return rc;
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ZhouShuiQing/rpm.git
git@gitee.com:ZhouShuiQing/rpm.git
ZhouShuiQing
rpm
rpm
master

搜索帮助