提交 91cbf011 编写于 作者: R Richard Weinberger

Revert "ubifs: Fix memory leak bug in alloc_ubifs_info() error path"

This reverts commit 9163e018.

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: 9163e018 ("ubifs: Fix memory leak bug in alloc_ubifs_info() error path")
Reported-by: https://twitter.com/grsecurity/status/1180609139359277056Signed-off-by: NRichard Weinberger <richard@nod.at>
Tested-by: NRomain Izard <romain.izard.pro@gmail.com>
Signed-off-by: NRichard Weinberger <richard@nod.at>
上级 7cc7720f
......@@ -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))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册