summaryrefslogtreecommitdiffstats
path: root/fs/hfsplus/wrapper.c
diff options
context:
space:
mode:
authorChuck Ebbert2011-02-02 16:55:06 +0100
committerChristoph Hellwig2011-02-04 00:34:11 +0100
commita1dbcef0172555464b5329f8ba47d43c98132dfa (patch)
treeca0753e098a42cb44b904fcff0e9f9143a57582e /fs/hfsplus/wrapper.c
parenthfsplus: do not leak buffer on error (diff)
downloadkernel-qcow2-linux-a1dbcef0172555464b5329f8ba47d43c98132dfa.tar.gz
kernel-qcow2-linux-a1dbcef0172555464b5329f8ba47d43c98132dfa.tar.xz
kernel-qcow2-linux-a1dbcef0172555464b5329f8ba47d43c98132dfa.zip
hfsplus: fix two memory leaks in wrapper.c
Signed-Off-By: Chuck Ebbert <cebbert@redhat.com> Signed-off-by: Christoph Hellwig <hch@tuxera.com>
Diffstat (limited to 'fs/hfsplus/wrapper.c')
-rw-r--r--fs/hfsplus/wrapper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/hfsplus/wrapper.c b/fs/hfsplus/wrapper.c
index 196231794f64..3031d81f5f0f 100644
--- a/fs/hfsplus/wrapper.c
+++ b/fs/hfsplus/wrapper.c
@@ -167,7 +167,7 @@ reread:
break;
case cpu_to_be16(HFSP_WRAP_MAGIC):
if (!hfsplus_read_mdb(sbi->s_vhdr, &wd))
- goto out;
+ goto out_free_backup_vhdr;
wd.ablk_size >>= HFSPLUS_SECTOR_SHIFT;
part_start += wd.ablk_start + wd.embed_start * wd.ablk_size;
part_size = wd.embed_count * wd.ablk_size;
@@ -179,7 +179,7 @@ reread:
* (should do this only for cdrom/loop though)
*/
if (hfs_part_find(sb, &part_start, &part_size))
- goto out;
+ goto out_free_backup_vhdr;
goto reread;
}