]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitfe0e11cd5fcf1341e42f002a3b82dbb2af203c64
treec935bd4610c25cfc0ceb7451f76ff009a2704e93
parentbe5d2bcfad9fe185943b83569300f9d3522a07f6
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