提交 a1dbcef0 编写于 作者: C Chuck Ebbert 提交者: Christoph Hellwig

hfsplus: fix two memory leaks in wrapper.c

Signed-Off-By: NChuck Ebbert <cebbert@redhat.com>
Signed-off-by: NChristoph Hellwig <hch@tuxera.com>
上级 14dd01f8
...@@ -167,7 +167,7 @@ int hfsplus_read_wrapper(struct super_block *sb) ...@@ -167,7 +167,7 @@ int hfsplus_read_wrapper(struct super_block *sb)
break; break;
case cpu_to_be16(HFSP_WRAP_MAGIC): case cpu_to_be16(HFSP_WRAP_MAGIC):
if (!hfsplus_read_mdb(sbi->s_vhdr, &wd)) if (!hfsplus_read_mdb(sbi->s_vhdr, &wd))
goto out; goto out_free_backup_vhdr;
wd.ablk_size >>= HFSPLUS_SECTOR_SHIFT; wd.ablk_size >>= HFSPLUS_SECTOR_SHIFT;
part_start += wd.ablk_start + wd.embed_start * wd.ablk_size; part_start += wd.ablk_start + wd.embed_start * wd.ablk_size;
part_size = wd.embed_count * wd.ablk_size; part_size = wd.embed_count * wd.ablk_size;
...@@ -179,7 +179,7 @@ int hfsplus_read_wrapper(struct super_block *sb) ...@@ -179,7 +179,7 @@ int hfsplus_read_wrapper(struct super_block *sb)
* (should do this only for cdrom/loop though) * (should do this only for cdrom/loop though)
*/ */
if (hfs_part_find(sb, &part_start, &part_size)) if (hfs_part_find(sb, &part_start, &part_size))
goto out; goto out_free_backup_vhdr;
goto reread; goto reread;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册