]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selinux: don't bother with selinuxfs_info_free() on failures
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 15 Jun 2025 02:01:54 +0000 (03:01 +0100)
committerPaul Moore <paul@paul-moore.com>
Tue, 24 Jun 2025 23:39:28 +0000 (19:39 -0400)
Failures in sel_fill_super() will be followed by sel_kill_sb(), which
will call selinuxfs_info_free() anyway.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Reviewed-by: Christian Brauner <brauner@kernel.org>
[PM: subj and description tweaks]
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/selinuxfs.c

index 95765374f58d0ff37da8a68ebcf2858404905a22..9aa1d03ab6120a8b854927ed0452b5f4130c3fc9 100644 (file)
@@ -2098,8 +2098,6 @@ err:
        pr_err("SELinux: %s:  failed while creating inodes\n",
                __func__);
 
-       selinux_fs_info_free(sb);
-
        return ret;
 }