From owner-svn-src-all@FreeBSD.ORG Sat Nov 29 21:48:13 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3999C106567C; Sat, 29 Nov 2008 21:48:13 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F8998FC14; Sat, 29 Nov 2008 21:48:13 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mATLmDWP063390; Sat, 29 Nov 2008 21:48:13 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mATLmCdT063389; Sat, 29 Nov 2008 21:48:12 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200811292148.mATLmCdT063389@svn.freebsd.org> From: Robert Watson Date: Sat, 29 Nov 2008 21:48:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185457 - in releng/7.1/sys: . security/mac_bsdextended X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2008 21:48:13 -0000 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); }