Commit a1dbcef0172555464b5329f8ba47d43c98132dfa

Authored by Chuck Ebbert
Committed by Christoph Hellwig
1 parent 14dd01f883

hfsplus: fix two memory leaks in wrapper.c

Signed-Off-By: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Christoph Hellwig <hch@tuxera.com>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

fs/hfsplus/wrapper.c
... ... @@ -167,7 +167,7 @@
167 167 break;
168 168 case cpu_to_be16(HFSP_WRAP_MAGIC):
169 169 if (!hfsplus_read_mdb(sbi->s_vhdr, &wd))
170   - goto out;
  170 + goto out_free_backup_vhdr;
171 171 wd.ablk_size >>= HFSPLUS_SECTOR_SHIFT;
172 172 part_start += wd.ablk_start + wd.embed_start * wd.ablk_size;
173 173 part_size = wd.embed_count * wd.ablk_size;
... ... @@ -179,7 +179,7 @@
179 179 * (should do this only for cdrom/loop though)
180 180 */
181 181 if (hfs_part_find(sb, &part_start, &part_size))
182   - goto out;
  182 + goto out_free_backup_vhdr;
183 183 goto reread;
184 184 }
185 185