Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Nov 2008 14:58:59 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r185440 - stable/7/sys/security/mac_bsdextended
Message-ID:  <200811291458.mATEwx32054504@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rwatson
Date: Sat Nov 29 14:58:58 2008
New Revision: 185440
URL: http://svn.freebsd.org/changeset/base/185440

Log:
  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:
  stable/7/sys/security/mac_bsdextended/mac_bsdextended.c

Modified: stable/7/sys/security/mac_bsdextended/mac_bsdextended.c
==============================================================================
--- stable/7/sys/security/mac_bsdextended/mac_bsdextended.c	Sat Nov 29 14:57:58 2008	(r185439)
+++ stable/7/sys/security/mac_bsdextended/mac_bsdextended.c	Sat Nov 29 14:58:58 2008	(r185440)
@@ -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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811291458.mATEwx32054504>