加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-util-grub-mkfont-Fix-resource-leaks.patch 1.10 KB
一键复制 编辑 原始数据 按行查看 历史
zhangqiumiao 提交于 2022-10-23 22:14 . backport some patches from upstream
From 78baa77c01f88662d980be38250344f7379b6655 Mon Sep 17 00:00:00 2001
From: Qiumiao Zhang <zhangqiumiao1@huawei.com>
Date: Mon, 1 Aug 2022 16:31:02 +0800
Subject: util/grub-mkfont: Fix resource leaks
Reference:https://git.savannah.gnu.org/cgit/grub.git/commit?id=78baa77c01f88662d980be38250344f7379b6655
Conflict:NA
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
---
util/grub-mkfont.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/util/grub-mkfont.c b/util/grub-mkfont.c
index bb6982d..f63890c 100644
--- a/util/grub-mkfont.c
+++ b/util/grub-mkfont.c
@@ -656,6 +656,7 @@ add_font (struct grub_font_info *font_info, FT_Face face, int nocut)
}
}
}
+ free (gsub);
}
if (font_info->num_range)
@@ -1279,11 +1280,15 @@ main (int argc, char *argv[])
if (font_verbosity > 1)
print_glyphs (&arguments.font_info);
+ free (arguments.font_info.glyphs_sorted);
+
{
size_t i;
for (i = 0; i < arguments.nfiles; i++)
free (arguments.files[i]);
}
+ free (arguments.files);
+
return 0;
}
--
2.19.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化