Skip to content

Commit

Permalink
hfsplus: do not leak buffer on error
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 c5b8d0b commit 14dd01f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/hfsplus/part_tbl.c
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 14dd01f

Please sign in to comment.