Skip to content

Commit d353efd

Browse files
Fabian Fredericktorvalds
authored andcommitted
fs/affs/super.c: bugfix / double free
Commit 842a859 ("affs: use ->kill_sb() to simplify ->put_super() and failure exits of ->mount()") adds .kill_sb which frees sbi but doesn't remove sbi free in case of parse_options error causing double free+random crash. Signed-off-by: Fabian Frederick <fabf@skynet.be> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: <stable@vger.kernel.org> [3.14.x] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 1e2ee49 commit d353efd

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

‎fs/affs/super.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,6 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
340340
&blocksize,&sbi->s_prefix,
341341
sbi->s_volume, &mount_flags)) {
342342
printk(KERN_ERR "AFFS: Error parsing options\n");
343-
kfree(sbi->s_prefix);
344-
kfree(sbi);
345343
return -EINVAL;
346344
}
347345
/* N.B. after this point s_prefix must be released */

0 commit comments

Comments
 (0)