From owner-svn-src-all@FreeBSD.ORG Wed Mar 10 14:21:05 2010 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 E37AE106564A; Wed, 10 Mar 2010 14:21:05 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D31468FC1D; Wed, 10 Mar 2010 14:21:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2AEL55R061684; Wed, 10 Mar 2010 14:21:05 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2AEL5qF061681; Wed, 10 Mar 2010 14:21:05 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003101421.o2AEL5qF061681@svn.freebsd.org> From: Luigi Rizzo Date: Wed, 10 Mar 2010 14:21:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204954 - head/sys/netinet/ipfw 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: Wed, 10 Mar 2010 14:21:06 -0000 Author: luigi Date: Wed Mar 10 14:21:05 2010 New Revision: 204954 URL: http://svn.freebsd.org/changeset/base/204954 Log: fix handling of commands issued by RELENG_7 version of /sbin/ipfw, Submitted by: Riccardo Panicucci Modified: head/sys/netinet/ipfw/ip_dn_glue.c head/sys/netinet/ipfw/ip_fw_sockopt.c Modified: head/sys/netinet/ipfw/ip_dn_glue.c ============================================================================== --- head/sys/netinet/ipfw/ip_dn_glue.c Wed Mar 10 13:54:13 2010 (r204953) +++ head/sys/netinet/ipfw/ip_dn_glue.c Wed Mar 10 14:21:05 2010 (r204954) @@ -495,7 +495,7 @@ dn_compat_config_profile(struct dn_profi static int dn_compat_configure(void *v) { - struct dn_id *buf, *base; + struct dn_id *buf = NULL, *base; struct dn_sch *sch = NULL; struct dn_link *p = NULL; struct dn_fs *fs = NULL; @@ -547,6 +547,8 @@ dn_compat_configure(void *v) } error = do_config(base, (char *)buf - (char *)base); + if (buf) + free(buf, M_DUMMYNET); return error; } Modified: head/sys/netinet/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_sockopt.c Wed Mar 10 13:54:13 2010 (r204953) +++ head/sys/netinet/ipfw/ip_fw_sockopt.c Wed Mar 10 14:21:05 2010 (r204954) @@ -951,7 +951,7 @@ ipfw_ctl(struct sockopt *sopt) case IP_FW_ADD: rule = malloc(RULE_MAXSIZE, M_TEMP, M_WAITOK); error = sooptcopyin(sopt, rule, RULE_MAXSIZE, - sizeof(struct ip_fw) ); + sizeof(struct ip_fw7) ); /* * If the size of commands equals RULESIZE7 then we assume