diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-05-06 15:50:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-05-06 16:05:00 -0400 |
commit | d353efd02357a74753cd45f367a2d3d357fd6904 (patch) | |
tree | 33fe74042cee8e221b31517d8a90fb7e8cbee5b4 /fs/affs | |
parent | 1e2ee49f7f1b79f0b14884fe6a602f0411b39552 (diff) |
fs/affs/super.c: bugfix / double free
Commit 842a859db26b ("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>
Diffstat (limited to 'fs/affs')
-rw-r--r-- | fs/affs/super.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/affs/super.c b/fs/affs/super.c index 6d589f28bf9b..895ac7dc9dbf 100644 --- a/fs/affs/super.c +++ b/fs/affs/super.c | |||
@@ -340,8 +340,6 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent) | |||
340 | &blocksize,&sbi->s_prefix, | 340 | &blocksize,&sbi->s_prefix, |
341 | sbi->s_volume, &mount_flags)) { | 341 | sbi->s_volume, &mount_flags)) { |
342 | printk(KERN_ERR "AFFS: Error parsing options\n"); | 342 | printk(KERN_ERR "AFFS: Error parsing options\n"); |
343 | kfree(sbi->s_prefix); | ||
344 | kfree(sbi); | ||
345 | return -EINVAL; | 343 | return -EINVAL; |
346 | } | 344 | } |
347 | /* N.B. after this point s_prefix must be released */ | 345 | /* N.B. after this point s_prefix must be released */ |