If exFAT encounters errors during multiple mount operations, 'sbi' and 'nls' will not be released, which will cause a memory leak. Fixes: 719c1e1829166 ("exfat: add super block operations") Signed-off-by: YangWen --- fs/exfat/super.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/exfat/super.c b/fs/exfat/super.c index 74d451f732c7..db28a426206c 100644 --- a/fs/exfat/super.c +++ b/fs/exfat/super.c @@ -722,10 +722,15 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc) sb->s_root = NULL; free_table: + exfat_free_upcase_table(sbi); exfat_free_bitmap(sbi); brelse(sbi->boot_bh); check_nls_io: + unload_nls(sbi->nls_io); + exfat_free_iocharset(sbi); + sb->s_fs_info = NULL; + kfree(sbi); return err; } -- 2.43.0