Skip to content

Commit

Permalink
hfsplus: fix two memory leaks in wrapper.c
Browse files Browse the repository at this point in the history
Signed-Off-By: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Christoph Hellwig <hch@tuxera.com>
  • Loading branch information
Chuck Ebbert authored and Christoph Hellwig committed Feb 3, 2011
1 parent 14dd01f commit a1dbcef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/hfsplus/wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ int hfsplus_read_wrapper(struct super_block *sb)
break;
case cpu_to_be16(HFSP_WRAP_MAGIC):
if (!hfsplus_read_mdb(sbi->s_vhdr, &wd))
goto out;
goto out_free_backup_vhdr;
wd.ablk_size >>= HFSPLUS_SECTOR_SHIFT;
part_start += wd.ablk_start + wd.embed_start * wd.ablk_size;
part_size = wd.embed_count * wd.ablk_size;
Expand All @@ -179,7 +179,7 @@ int hfsplus_read_wrapper(struct super_block *sb)
* (should do this only for cdrom/loop though)
*/
if (hfs_part_find(sb, &part_start, &part_size))
goto out;
goto out_free_backup_vhdr;
goto reread;
}

Expand Down

0 comments on commit a1dbcef

Please sign in to comment.