fs/ntfs3: Fix memory leak if fill_super failed
mainline inclusion from mainline-v5.15 commit 9b75450d category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4G67J?from=project-issue CVE: NA ---------------------------------------------------------------------- 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> Signed-off-by:
Yin Xiujiang <yinxiujiang@kylinos.cn> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com> Acked-by:
Hou Tao <houtao1@huawei.com> Acked-by:
Xie XiuQi <xiexiuqi@huawei.com> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com>
Loading
Please sign in to comment