Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 59218
b: refs/heads/master
c: 9dc9978
h: refs/heads/master
v: v3
  • Loading branch information
Eric Paris authored and James Morris committed Jul 12, 2007
1 parent b16a49e commit 43538f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e47c8fc582a2c9f3cba059e543c4a056cd6bf8c4
refs/heads/master: 9dc9978084ea2a96b9f42752753d9e38a9f9d7b2
7 changes: 7 additions & 0 deletions trunk/security/selinux/ss/policydb.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
*/

#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/errno.h>
Expand Down Expand Up @@ -598,6 +599,7 @@ void policydb_destroy(struct policydb *p)
struct range_trans *rt, *lrt = NULL;

for (i = 0; i < SYM_NUM; i++) {
cond_resched();
hashtab_map(p->symtab[i].table, destroy_f[i], NULL);
hashtab_destroy(p->symtab[i].table);
}
Expand All @@ -612,6 +614,7 @@ void policydb_destroy(struct policydb *p)
avtab_destroy(&p->te_avtab);

for (i = 0; i < OCON_NUM; i++) {
cond_resched();
c = p->ocontexts[i];
while (c) {
ctmp = c;
Expand All @@ -623,6 +626,7 @@ void policydb_destroy(struct policydb *p)

g = p->genfs;
while (g) {
cond_resched();
kfree(g->fstype);
c = g->head;
while (c) {
Expand All @@ -639,18 +643,21 @@ void policydb_destroy(struct policydb *p)
cond_policydb_destroy(p);

for (tr = p->role_tr; tr; tr = tr->next) {
cond_resched();
kfree(ltr);
ltr = tr;
}
kfree(ltr);

for (ra = p->role_allow; ra; ra = ra -> next) {
cond_resched();
kfree(lra);
lra = ra;
}
kfree(lra);

for (rt = p->range_tr; rt; rt = rt -> next) {
cond_resched();
if (lrt) {
ebitmap_destroy(&lrt->target_range.level[0].cat);
ebitmap_destroy(&lrt->target_range.level[1].cat);
Expand Down

0 comments on commit 43538f1

Please sign in to comment.