Commit 47bfa6d9 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'selinux-pr-20190115' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux

Pull SELinux fix from Paul Moore:
 "One small patch to fix a potential NULL dereference on a failed
  SELinux policy load"

* tag 'selinux-pr-20190115' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
  selinux: fix GPF on invalid policy
parents 7939f8be 5b0e7310
...@@ -732,7 +732,8 @@ static int sens_destroy(void *key, void *datum, void *p) ...@@ -732,7 +732,8 @@ static int sens_destroy(void *key, void *datum, void *p)
kfree(key); kfree(key);
if (datum) { if (datum) {
levdatum = datum; levdatum = datum;
ebitmap_destroy(&levdatum->level->cat); if (levdatum->level)
ebitmap_destroy(&levdatum->level->cat);
kfree(levdatum->level); kfree(levdatum->level);
} }
kfree(datum); kfree(datum);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment