hfsplus: fix two memory leaks in wrapper.c
authorChuck Ebbert <cebbert@redhat.com>
Wed, 2 Feb 2011 15:55:06 +0000 (10:55 -0500)
committerChristoph Hellwig <hch@tuxera.com>
Thu, 3 Feb 2011 23:34:11 +0000 (16:34 -0700)
Signed-Off-By: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Christoph Hellwig <hch@tuxera.com>
fs/hfsplus/wrapper.c

index 196231794f646de0ead6b1e3d6cfc5d29c7ce54d..3031d81f5f0f585b17ecc3928da80b19b8a9eee3 100644 (file)
@@ -167,7 +167,7 @@ reread:
                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;
@@ -179,7 +179,7 @@ reread:
                 * (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;
        }