6 Star 0 Fork 27

src-openEuler/parted
关闭

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0006-hfsplus_cache_from_extent-fix-memleak.patch 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
From ab6fde7a74ae90446a1ae88da82fee572a8a0466 Mon Sep 17 00:00:00 2001
From: Li Jinlin <lijinlin3@huawei.com>
Date: Tue, 29 Mar 2022 11:08:46 +0800
Subject: [PATCH 5/6] hfsplus_cache_from_extent: fix memleak
Need to release node when an error occurs
Signed-off-by: Wu Guanghao <wuguanghao3@huawei.com>
Signed-off-by: Li Jinlin <lijinlin3@huawei.com>
---
libparted/fs/r/hfs/reloc_plus.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libparted/fs/r/hfs/reloc_plus.c b/libparted/fs/r/hfs/reloc_plus.c
index f065406..44e3490 100644
--- a/libparted/fs/r/hfs/reloc_plus.c
+++ b/libparted/fs/r/hfs/reloc_plus.c
@@ -670,8 +670,10 @@ hfsplus_cache_from_extent(HfsCPrivateCache* cache, PedFileSystem* fs,
_("The extents overflow file should not"
" contain its own extents! You should "
"check the file system."))
- != PED_EXCEPTION_IGNORE)
+ != PED_EXCEPTION_IGNORE) {
+ free(node);
return 0;
+ }
where = CR_BTREE_EXT_EXT;
break;
case PED_CPU_TO_BE32 (HFS_CATALOG_ID) :
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/parted.git
git@gitee.com:src-openeuler/parted.git
src-openeuler
parted
parted
master

搜索帮助