aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines
diff options
context:
space:
mode:
authorOndrej Mosnacek <[email protected]>2019-03-17 14:46:53 +0100
committerPaul Moore <[email protected]>2019-03-18 12:19:48 -0400
commit6a1afffb08ce5f9fb9ccc20f7ab24846c0142984 (patch)
tree960c8d62d8a57248005a8f626b79b4eb37d53dea /tools/perf/util/scripting-engines
parent9e98c678c2d6ae3a17cb2de55d17f69dddaa231b (diff)
selinux: fix NULL dereference in policydb_destroy()
The conversion to kvmalloc() forgot to account for the possibility that p->type_attr_map_array might be null in policydb_destroy(). Fix this by destroying its contents only if it is not NULL. Also make sure ebitmap_init() is called on all entries before policydb_destroy() can be called. Right now this is a no-op, because both kvcalloc() and ebitmap_init() just zero out the whole struct, but let's rather not rely on a specific implementation. Reported-by: [email protected] Fixes: acdf52d97f82 ("selinux: convert to kvmalloc") Signed-off-by: Ondrej Mosnacek <[email protected]> Acked-by: Stephen Smalley <[email protected]> Signed-off-by: Paul Moore <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines')
0 files changed, 0 insertions, 0 deletions