summaryrefslogtreecommitdiffstats
path: root/fs/affs
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-05-06 12:50:11 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-05-06 13:05:00 -0700
commitd353efd02357a74753cd45f367a2d3d357fd6904 (patch)
tree33fe74042cee8e221b31517d8a90fb7e8cbee5b4 /fs/affs
parent1e2ee49f7f1b79f0b14884fe6a602f0411b39552 (diff)
downloadblackbird-op-linux-d353efd02357a74753cd45f367a2d3d357fd6904.tar.gz
blackbird-op-linux-d353efd02357a74753cd45f367a2d3d357fd6904.zip
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.c2
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)
&blocksize,&sbi->s_prefix,
sbi->s_volume, &mount_flags)) {
printk(KERN_ERR "AFFS: Error parsing options\n");
- kfree(sbi->s_prefix);
- kfree(sbi);
return -EINVAL;
}
/* N.B. after this point s_prefix must be released */
OpenPOWER on IntegriCloud