From owner-svn-src-all@FreeBSD.ORG Sat Nov 29 14:58:59 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 14B8B1065672; Sat, 29 Nov 2008 14:58:59 +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 0DFAF8FC17; Sat, 29 Nov 2008 14:58:59 +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 mATEwxTm054505; Sat, 29 Nov 2008 14:58:59 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mATEwx32054504; Sat, 29 Nov 2008 14:58:59 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200811291458.mATEwx32054504@svn.freebsd.org> From: Robert Watson Date: Sat, 29 Nov 2008 14:58:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185440 - stable/7/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 14:58:59 -0000 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); }