]> git.baikalelectronics.ru Git - kernel.git/commit
selinux: fix error return code in policydb_read()
authorWei Yongjun <weiyongjun1@huawei.com>
Wed, 29 Apr 2020 07:30:53 +0000 (07:30 +0000)
committerPaul Moore <paul@paul-moore.com>
Fri, 1 May 2020 19:02:14 +0000 (15:02 -0400)
commit2ca89f02f1edcf42a8cc73bf009cbf946d6df1ab
tree343c931f942fdd37e80360b64309eb14e62aa7b9
parent0d2e44983d88c82ffb94531ee73dbb1f0fcc865a
selinux: fix error return code in policydb_read()

Fix to return negative error code -ENOMEM from the kvcalloc() error
handling case instead of 0, as done elsewhere in this function.

Fixes: a11ac6a8afc8 ("selinux: convert to kvmalloc")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/ss/policydb.c