1 Star 0 Fork 14

liujie/openEuler_ipmitool

forked from src-openEuler/ipmitool 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
hpm-Fix-resource-leak.patch 760 Bytes
一键复制 编辑 原始数据 按行查看 历史
hexiaowen 提交于 2019-09-30 22:53 +08:00 . Package init
From 272d9d0d9b29f41b6b10a870d856fec8d19233e2 Mon Sep 17 00:00:00 2001
From: Josef Moellers <jmoellers@suse.de>
Date: Thu, 24 Jan 2019 09:16:49 +0100
Subject: [PATCH 095/119] hpm: Fix resource leak
fclose(pImageFile) was missing before returning from
HpmfwupgGetBufferFromFile()
---
lib/ipmi_hpmfwupg.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/ipmi_hpmfwupg.c b/lib/ipmi_hpmfwupg.c
index ac1d90f..4783eec 100644
--- a/lib/ipmi_hpmfwupg.c
+++ b/lib/ipmi_hpmfwupg.c
@@ -1398,6 +1398,7 @@ HpmfwupgGetBufferFromFile(char *imageFilename,
if (ret != 0) {
lprintf(LOG_ERR, "Failed to seek in the image file '%s'",
imageFilename);
+ fclose(pImageFile);
return HPMFWUPG_ERROR;
}
pFwupgCtx->imageSize = ftell(pImageFile);
--
2.19.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/liujie-666/ipmitool_1.git
git@gitee.com:liujie-666/ipmitool_1.git
liujie-666
ipmitool_1
openEuler_ipmitool
master

搜索帮助