1 Star 0 Fork 76

gys/rpm

forked from src-openEuler/rpm 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-Fix-h-blob-leak-when-installing-source-rpms.patch 785 Bytes
一键复制 编辑 原始数据 按行查看 历史
From 86c1d9738de58eb8f8844c5345baeb578ace9485 Mon Sep 17 00:00:00 2001
From: xujing <xujing125@huawei.com>
Date: Thu, 24 Nov 2022 17:33:53 +0800
Subject: [PATCH 3/3] Fix h->blob leak when installing source rpms
When installing source rpms, "ei" is malloced and is saved in
blob->ei by rpmReadPackageFile->rpmpkgRead->hdrblobRead, and then
blob->ei is saved in h->blob by rpmReadPackageFile->hdrblobImport,
which is leaked during installation.
---
lib/header.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/header.c b/lib/header.c
index 31d2fca30..004102dd2 100644
--- a/lib/header.c
+++ b/lib/header.c
@@ -241,6 +241,7 @@ Header headerFree(Header h)
}
h->index = _free(h->index);
}
+ h->blob = _free(h->blob);
h = _free(h);
return NULL;
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gys66/rpm.git
git@gitee.com:gys66/rpm.git
gys66
rpm
rpm
master

搜索帮助