selinux: simplify duplicate_policydb_cond_list() by using kmemdup()
authorOndrej Mosnacek <omosnace@redhat.com>
Tue, 30 Mar 2021 13:16:45 +0000 (15:16 +0200)
committerPaul Moore <paul@paul-moore.com>
Tue, 11 May 2021 01:31:58 +0000 (21:31 -0400)
commitfba472bb38e2d2b9a676364ade4be4e5df665a82
tree1ebd303d97a1a16739f61b98d98fedf20a440619
parent6efb943b8616ec53a5e444193dccf1af9ad627b5
selinux: simplify duplicate_policydb_cond_list() by using kmemdup()

We can do the allocation + copying of expr.nodes in one go using
kmemdup().

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/ss/conditional.c