diff options
Diffstat (limited to 'security/selinux/ss/policydb.c')
-rw-r--r-- | security/selinux/ss/policydb.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c index 14190efbf333..785c33cf4864 100644 --- a/security/selinux/ss/policydb.c +++ b/security/selinux/ss/policydb.c | |||
@@ -590,17 +590,12 @@ void policydb_destroy(struct policydb *p) | |||
590 | hashtab_destroy(p->symtab[i].table); | 590 | hashtab_destroy(p->symtab[i].table); |
591 | } | 591 | } |
592 | 592 | ||
593 | for (i = 0; i < SYM_NUM; i++) { | 593 | for (i = 0; i < SYM_NUM; i++) |
594 | if (p->sym_val_to_name[i]) | 594 | kfree(p->sym_val_to_name[i]); |
595 | kfree(p->sym_val_to_name[i]); | ||
596 | } | ||
597 | 595 | ||
598 | if (p->class_val_to_struct) | 596 | kfree(p->class_val_to_struct); |
599 | kfree(p->class_val_to_struct); | 597 | kfree(p->role_val_to_struct); |
600 | if (p->role_val_to_struct) | 598 | kfree(p->user_val_to_struct); |
601 | kfree(p->role_val_to_struct); | ||
602 | if (p->user_val_to_struct) | ||
603 | kfree(p->user_val_to_struct); | ||
604 | 599 | ||
605 | avtab_destroy(&p->te_avtab); | 600 | avtab_destroy(&p->te_avtab); |
606 | 601 | ||