]> git.baikalelectronics.ru Git - kernel.git/commit
selinux: fix allocation failure check on newpolicy->sidtab
authorColin Ian King <colin.king@canonical.com>
Wed, 19 Aug 2020 10:42:56 +0000 (11:42 +0100)
committerPaul Moore <paul@paul-moore.com>
Wed, 19 Aug 2020 13:14:04 +0000 (09:14 -0400)
commit12d450594cd457bc8c1f417f767f32d816502943
tree1193a2717426983f4d656d49245a61c6e7a1d728
parentaf4864c1b2c0442b8b74f46dbca205106db4f86b
selinux: fix allocation failure check on newpolicy->sidtab

The allocation check of newpolicy->sidtab is null checking if
newpolicy is null and not newpolicy->sidtab. Fix this.

Addresses-Coverity: ("Logically dead code")
Fixes: af4864c1b2c0 ("selinux: refactor changing booleans")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/ss/services.c