|
@@ -275,6 +275,8 @@ static int rangetr_cmp(struct hashtab *h, const void *k1, const void *k2)
|
|
|
return v;
|
|
return v;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+static int (*destroy_f[SYM_NUM]) (void *key, void *datum, void *datap);
|
|
|
|
|
+
|
|
|
/*
|
|
/*
|
|
|
* Initialize a policy database structure.
|
|
* Initialize a policy database structure.
|
|
|
*/
|
|
*/
|
|
@@ -322,8 +324,10 @@ static int policydb_init(struct policydb *p)
|
|
|
out:
|
|
out:
|
|
|
hashtab_destroy(p->filename_trans);
|
|
hashtab_destroy(p->filename_trans);
|
|
|
hashtab_destroy(p->range_tr);
|
|
hashtab_destroy(p->range_tr);
|
|
|
- for (i = 0; i < SYM_NUM; i++)
|
|
|
|
|
|
|
+ for (i = 0; i < SYM_NUM; i++) {
|
|
|
|
|
+ hashtab_map(p->symtab[i].table, destroy_f[i], NULL);
|
|
|
hashtab_destroy(p->symtab[i].table);
|
|
hashtab_destroy(p->symtab[i].table);
|
|
|
|
|
+ }
|
|
|
return rc;
|
|
return rc;
|
|
|
}
|
|
}
|
|
|
|
|
|