diff options
author | rwatson <rwatson@FreeBSD.org> | 2008-10-27 18:08:12 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2008-10-27 18:08:12 +0000 |
commit | e7cc073f0349712a7a28d6f3d263cf6f9b1f63dc (patch) | |
tree | b21591ff02b36aa539d3224840349d5f63f2a3db /sys/security/mac_bsdextended/mac_bsdextended.c | |
parent | 2c926ba9a74a1b032663913127b25382a704238f (diff) | |
download | FreeBSD-src-e7cc073f0349712a7a28d6f3d263cf6f9b1f63dc.zip FreeBSD-src-e7cc073f0349712a7a28d6f3d263cf6f9b1f63dc.tar.gz |
When the mac_bsdextended policy is unloaded, free rule memory.
Obtained from: TrustedBSD Project
MFC after: 3 days
Diffstat (limited to 'sys/security/mac_bsdextended/mac_bsdextended.c')
-rw-r--r-- | sys/security/mac_bsdextended/mac_bsdextended.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/security/mac_bsdextended/mac_bsdextended.c b/sys/security/mac_bsdextended/mac_bsdextended.c index 1c8e6c7..14706e0 100644 --- a/sys/security/mac_bsdextended/mac_bsdextended.c +++ b/sys/security/mac_bsdextended/mac_bsdextended.c @@ -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); } |