aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus
diff options
context:
space:
mode:
authorSeth Forshee <seth.forshee@canonical.com>2011-09-15 10:48:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-09-15 12:03:16 -0400
commitf588c960fcaa6fa8bf82930bb819c9aca4eb9347 (patch)
treea2ed7bbc8339e203c4ef9e41d2181b2da7bb5241 /fs/hfsplus
parentcc39c6a9bbdebfcf1a7dee64d83bf302bc38d941 (diff)
hfsplus: Fix kfree of wrong pointers in hfsplus_fill_super() error path
Commit 6596528e391a ("hfsplus: ensure bio requests are not smaller than the hardware sectors") changed the pointers used for volume header allocations but failed to free the correct pointers in the error path path of hfsplus_fill_super() and hfsplus_read_wrapper. The second hunk came from a separate patch by Pavel Ivanov. Reported-by: Pavel Ivanov <paivanof@gmail.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Christoph Hellwig <hch@tuxera.com> Cc: <stable@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/hfsplus')
-rw-r--r--fs/hfsplus/super.c4
-rw-r--r--fs/hfsplus/wrapper.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
index c106ca22e812..cadbb8c81887 100644
--- a/fs/hfsplus/super.c
+++ b/fs/hfsplus/super.c
@@ -525,8 +525,8 @@ out_close_cat_tree:
525out_close_ext_tree: 525out_close_ext_tree:
526 hfs_btree_close(sbi->ext_tree); 526 hfs_btree_close(sbi->ext_tree);
527out_free_vhdr: 527out_free_vhdr:
528 kfree(sbi->s_vhdr); 528 kfree(sbi->s_vhdr_buf);
529 kfree(sbi->s_backup_vhdr); 529 kfree(sbi->s_backup_vhdr_buf);
530out_unload_nls: 530out_unload_nls:
531 unload_nls(sbi->nls); 531 unload_nls(sbi->nls);
532 unload_nls(nls); 532 unload_nls(nls);
diff --git a/fs/hfsplus/wrapper.c b/fs/hfsplus/wrapper.c
index 10e515a0d452..7daf4b852d1c 100644
--- a/fs/hfsplus/wrapper.c
+++ b/fs/hfsplus/wrapper.c
@@ -272,9 +272,9 @@ reread:
272 return 0; 272 return 0;
273 273
274out_free_backup_vhdr: 274out_free_backup_vhdr:
275 kfree(sbi->s_backup_vhdr); 275 kfree(sbi->s_backup_vhdr_buf);
276out_free_vhdr: 276out_free_vhdr:
277 kfree(sbi->s_vhdr); 277 kfree(sbi->s_vhdr_buf);
278out: 278out:
279 return error; 279 return error;
280} 280}