]> 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)
commit28ff5076cc8902a013350561eb23517b2c032ad6
tree1193a2717426983f4d656d49245a61c6e7a1d728
parent879a0f10dba193cd290c01d5efbfe7e9c59cb845
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: 879a0f10dba1 ("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