svn commit: r204954 - head/sys/netinet/ipfw
Luigi Rizzo
luigi at FreeBSD.org
Wed Mar 10 14:21:06 UTC 2010
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
More information about the svn-src-head
mailing list