aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/ss
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux/ss')
-rw-r--r--security/selinux/ss/policydb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c
index 0a758323a9cf..8e6262d12aa9 100644
--- a/security/selinux/ss/policydb.c
+++ b/security/selinux/ss/policydb.c
@@ -650,8 +650,10 @@ void policydb_destroy(struct policydb *p)
650 } 650 }
651 if (lrt) kfree(lrt); 651 if (lrt) kfree(lrt);
652 652
653 for (i = 0; i < p->p_types.nprim; i++) 653 if (p->type_attr_map) {
654 ebitmap_destroy(&p->type_attr_map[i]); 654 for (i = 0; i < p->p_types.nprim; i++)
655 ebitmap_destroy(&p->type_attr_map[i]);
656 }
655 kfree(p->type_attr_map); 657 kfree(p->type_attr_map);
656 658
657 return; 659 return;