fs/ntfs3: Fix memory leak if fill_super failed
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Tue, 28 Sep 2021 16:00:30 +0000 (19:00 +0300)
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Mon, 11 Oct 2021 16:17:48 +0000 (19:17 +0300)
commit9b75450d6c580100611743fa7e690ea3cb47cd4a
treec935bd4610c25cfc0ceb7451f76ff009a2704e93
parentce46ae0c3e31400dc89d1e4620a812647cab9c72
fs/ntfs3: Fix memory leak if fill_super failed

In ntfs_init_fs_context we allocate memory in fc->s_fs_info.
In case of failed mount we must free it in ntfs_fill_super.
We can't do it in ntfs_fs_free, because ntfs_fs_free called
with fc->s_fs_info == NULL.
fc->s_fs_info became NULL in sget_fc.

Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
fs/ntfs3/super.c