When the mac_bsdextended policy is unloaded, free rule memory.

Obtained from:	TrustedBSD Project
MFC after:	3 days
This commit is contained in:
rwatson 2008-10-27 18:08:12 +00:00
parent 2c926ba9a7
commit e7cc073f03

View File

@ -214,7 +214,12 @@ ugidfw_init(struct mac_policy_conf *mpc)
static void
ugidfw_destroy(struct mac_policy_conf *mpc)
{
int i;
for (i = 0; i < MAC_BSDEXTENDED_MAXRULES; i++) {
if (rules[i] != NULL)
free(rules[i], M_MACBSDEXTENDED);
}
mtx_destroy(&ugidfw_mtx);
}