When the mac_bsdextended policy is unloaded, free rule memory.

Obtained from:	TrustedBSD Project
MFC after:	3 days
This commit is contained in:
Robert Watson 2008-10-27 18:08:12 +00:00
parent 26041a143b
commit 168a6ae7a7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=184367

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);
}