Skip to content

Commit a1dbcef

Browse files
Chuck EbbertChristoph Hellwig
authored andcommitted
hfsplus: fix two memory leaks in wrapper.c
Signed-Off-By: Chuck Ebbert <cebbert@redhat.com> Signed-off-by: Christoph Hellwig <hch@tuxera.com>
1 parent 14dd01f commit a1dbcef

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎fs/hfsplus/wrapper.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ int hfsplus_read_wrapper(struct super_block *sb)
167167
break;
168168
case cpu_to_be16(HFSP_WRAP_MAGIC):
169169
if (!hfsplus_read_mdb(sbi->s_vhdr, &wd))
170-
goto out;
170+
goto out_free_backup_vhdr;
171171
wd.ablk_size >>= HFSPLUS_SECTOR_SHIFT;
172172
part_start += wd.ablk_start + wd.embed_start * wd.ablk_size;
173173
part_size = wd.embed_count * wd.ablk_size;
@@ -179,7 +179,7 @@ int hfsplus_read_wrapper(struct super_block *sb)
179179
* (should do this only for cdrom/loop though)
180180
*/
181181
if (hfs_part_find(sb, &part_start, &part_size))
182-
goto out;
182+
goto out_free_backup_vhdr;
183183
goto reread;
184184
}
185185

0 commit comments

Comments
 (0)