svn commit: r185457 - in releng/7.1/sys: . security/mac_bsdextended

Robert Watson rwatson at FreeBSD.org
Sat Nov 29 13:48:13 PST 2008


Author: rwatson
Date: Sat Nov 29 21:48:12 2008
New Revision: 185457
URL: http://svn.freebsd.org/changeset/base/185457

Log:
  Merge r185440 from stable/7 to releng/7.1:
  
    Merge r184367 from head to stable/7:
  
      When the mac_bsdextended policy is unloaded, free rule memory.
  
      Obtained from:       TrustedBSD Project
  
  Approved by:  re (kensmith)

Modified:
  releng/7.1/sys/   (props changed)
  releng/7.1/sys/security/mac_bsdextended/mac_bsdextended.c

Modified: releng/7.1/sys/security/mac_bsdextended/mac_bsdextended.c
==============================================================================
--- releng/7.1/sys/security/mac_bsdextended/mac_bsdextended.c	Sat Nov 29 21:46:28 2008	(r185456)
+++ releng/7.1/sys/security/mac_bsdextended/mac_bsdextended.c	Sat Nov 29 21:48:12 2008	(r185457)
@@ -208,7 +208,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);
 }
 


More information about the svn-src-all mailing list