]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
udf: fix nls leak on udf_fill_super() failure
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 11 Feb 2026 20:11:28 +0000 (15:11 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 15 Jun 2026 02:29:21 +0000 (22:29 -0400)
On all failure exits that go to error_out there we have already moved the
nls reference from uopt->nls_map to sbi->s_nls_map, leaving NULL behind.

Fixes: c4e89cc674ac ("udf: convert to new mount API")
Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/udf/super.c

index b2f168b0a0d18ef51692094c1de3aafca74b6d96..97a51c64ad48d925b1fdfd5159e6511c539cd715 100644 (file)
@@ -2320,7 +2320,7 @@ static int udf_fill_super(struct super_block *sb, struct fs_context *fc)
 
 error_out:
        iput(sbi->s_vat_inode);
-       unload_nls(uopt->nls_map);
+       unload_nls(sbi->s_nls_map);
        if (lvid_open)
                udf_close_lvid(sb);
        brelse(sbi->s_lvid_bh);