hfsplus: do not leak buffer on error
authorChuck Ebbert <cebbert@redhat.com>
Tue, 1 Feb 2011 21:41:55 +0000 (16:41 -0500)
committerChristoph Hellwig <hch@tuxera.com>
Thu, 3 Feb 2011 23:34:05 +0000 (16:34 -0700)
Signed-Off-By: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Christoph Hellwig <hch@tuxera.com>
fs/hfsplus/part_tbl.c

index d66ad113b1cc4e265f8af88f0ac50536b9ca6743..40ad88c12c64923e28600a75f05b958a3777726d 100644 (file)
@@ -134,7 +134,7 @@ int hfs_part_find(struct super_block *sb,
        res = hfsplus_submit_bio(sb->s_bdev, *part_start + HFS_PMAP_BLK,
                                 data, READ);
        if (res)
-               return res;
+               goto out;
 
        switch (be16_to_cpu(*((__be16 *)data))) {
        case HFS_OLD_PMAP_MAGIC:
@@ -147,7 +147,7 @@ int hfs_part_find(struct super_block *sb,
                res = -ENOENT;
                break;
        }
-
+out:
        kfree(data);
        return res;
 }
This page took 0.026873 seconds and 5 git commands to generate.