提交 14dd01f8 编写于 作者: C Chuck Ebbert 提交者: Christoph Hellwig

hfsplus: do not leak buffer on error

Signed-Off-By: NChuck Ebbert <cebbert@redhat.com>
Signed-off-by: NChristoph Hellwig <hch@tuxera.com>
上级 c5b8d0bc
......@@ -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;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册