diff options
author | Ondrej Mosnacek <omosnace@redhat.com> | 2020-01-16 13:04:34 +0100 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2020-01-16 22:05:25 +0100 |
commit | dd89b9d9f37decab85e000384d229abdcd9944ae (patch) | |
tree | 9375dc3bb6a32493cf1b965b6d5560036d253196 /security/selinux/hooks.c | |
parent | selinux: remove redundant allocation and helper functions (diff) | |
download | linux-dd89b9d9f37decab85e000384d229abdcd9944ae.tar.xz linux-dd89b9d9f37decab85e000384d229abdcd9944ae.zip |
selinux: do not allocate ancillary buffer on first load
In security_load_policy(), we can defer allocating the newpolicydb
ancillary array to after checking state->initialized, thereby avoiding
the pointless allocation when loading policy the first time.
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
[PM: merged portions by hand]
Reviewed-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/hooks.c')
0 files changed, 0 insertions, 0 deletions