mirror of
https://github.com/brain-hackers/linux-brain.git
synced 2024-06-09 23:36:23 +09:00
Revert "ubifs: Fix memory leak bug in alloc_ubifs_info() error path"
commit 91cbf01178c37086b32148c53e24b04cb77557cf upstream. This reverts commit9163e0184b
. At the point when ubifs_fill_super() runs, we have already a reference to the super block. So upon deactivate_locked_super() c will get free()'ed via ->kill_sb(). Cc: Wenwen Wang <wenwen@cs.uga.edu> Fixes:9163e0184b
("ubifs: Fix memory leak bug in alloc_ubifs_info() error path") Reported-by: https://twitter.com/grsecurity/status/1180609139359277056 Signed-off-by: Richard Weinberger <richard@nod.at> Tested-by: Romain Izard <romain.izard.pro@gmail.com> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d4da9d7d50
commit
e071addacd
|
@ -2267,10 +2267,8 @@ static struct dentry *ubifs_mount(struct file_system_type *fs_type, int flags,
|
|||
}
|
||||
} else {
|
||||
err = ubifs_fill_super(sb, data, flags & SB_SILENT ? 1 : 0);
|
||||
if (err) {
|
||||
kfree(c);
|
||||
if (err)
|
||||
goto out_deact;
|
||||
}
|
||||
/* We do not support atime */
|
||||
sb->s_flags |= SB_ACTIVE;
|
||||
if (IS_ENABLED(CONFIG_UBIFS_ATIME_SUPPORT))
|
||||
|
|
Loading…
Reference in New Issue
Block a user