forked from Minki/linux
hfsplus: do not leak buffer on error
Signed-Off-By: Chuck Ebbert <cebbert@redhat.com> Signed-off-by: Christoph Hellwig <hch@tuxera.com>
This commit is contained in:
parent
c5b8d0bce0
commit
14dd01f883
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user