Revert "ubifs: Fix memory leak bug in alloc_ubifs_info() error path"
authorRichard Weinberger <richard@nod.at>
Thu, 24 Oct 2019 08:25:35 +0000 (10:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Jan 2020 18:48:59 +0000 (19:48 +0100)
commite071addacd06c8140fd0bc422dfb3a013000ac2b
treea1d0f39c4685be4625dbf05c54cbabb48cce6f5d
parentd4da9d7d50a5c28c1ababa2e01ac947a19fe451c
Revert "ubifs: Fix memory leak bug in alloc_ubifs_info() error path"

commit 91cbf01178c37086b32148c53e24b04cb77557cf upstream.

This reverts commit 9163e0184bd7d5f779934d34581843f699ad2ffd.

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: 9163e0184bd7 ("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>
fs/ubifs/super.c