diff options
author | Chuck Ebbert <cebbert@redhat.com> | 2011-02-01 16:41:55 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@tuxera.com> | 2011-02-03 18:34:05 -0500 |
commit | 14dd01f88319a37b06ca909738044e39ec5bfdee (patch) | |
tree | a628f10480a7f850131500ea6735f40e3c4b0cf1 /fs/hfsplus/part_tbl.c | |
parent | c5b8d0bce052949e173b5b32f96bd59bceaa2ab0 (diff) |
hfsplus: do not leak buffer on error
Signed-Off-By: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Christoph Hellwig <hch@tuxera.com>
Diffstat (limited to 'fs/hfsplus/part_tbl.c')
-rw-r--r-- | fs/hfsplus/part_tbl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/hfsplus/part_tbl.c b/fs/hfsplus/part_tbl.c index d66ad113b1cc..40ad88c12c64 100644 --- a/fs/hfsplus/part_tbl.c +++ b/fs/hfsplus/part_tbl.c | |||
@@ -134,7 +134,7 @@ int hfs_part_find(struct super_block *sb, | |||
134 | res = hfsplus_submit_bio(sb->s_bdev, *part_start + HFS_PMAP_BLK, | 134 | res = hfsplus_submit_bio(sb->s_bdev, *part_start + HFS_PMAP_BLK, |
135 | data, READ); | 135 | data, READ); |
136 | if (res) | 136 | if (res) |
137 | return res; | 137 | goto out; |
138 | 138 | ||
139 | switch (be16_to_cpu(*((__be16 *)data))) { | 139 | switch (be16_to_cpu(*((__be16 *)data))) { |
140 | case HFS_OLD_PMAP_MAGIC: | 140 | case HFS_OLD_PMAP_MAGIC: |
@@ -147,7 +147,7 @@ int hfs_part_find(struct super_block *sb, | |||
147 | res = -ENOENT; | 147 | res = -ENOENT; |
148 | break; | 148 | break; |
149 | } | 149 | } |
150 | 150 | out: | |
151 | kfree(data); | 151 | kfree(data); |
152 | return res; | 152 | return res; |
153 | } | 153 | } |