summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2010-03-10 14:21:05 +0000
committerluigi <luigi@FreeBSD.org>2010-03-10 14:21:05 +0000
commit5bde959c5f21341a4fe865dd3e523157125fee19 (patch)
treeab4d1fd5ca6c401e39230877848bb5f63cd31562 /sys/netinet
parente0724fd324c89b8c46185fe402fd332141ea5bf5 (diff)
downloadFreeBSD-src-5bde959c5f21341a4fe865dd3e523157125fee19.zip
FreeBSD-src-5bde959c5f21341a4fe865dd3e523157125fee19.tar.gz
fix handling of commands issued by RELENG_7 version of /sbin/ipfw,
Submitted by: Riccardo Panicucci
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ipfw/ip_dn_glue.c4
-rw-r--r--sys/netinet/ipfw/ip_fw_sockopt.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet/ipfw/ip_dn_glue.c b/sys/netinet/ipfw/ip_dn_glue.c
index 69f189c..c0df1fc 100644
--- a/sys/netinet/ipfw/ip_dn_glue.c
+++ b/sys/netinet/ipfw/ip_dn_glue.c
@@ -495,7 +495,7 @@ dn_compat_config_profile(struct dn_profile *pf, struct dn_link *p,
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;
}
diff --git a/sys/netinet/ipfw/ip_fw_sockopt.c b/sys/netinet/ipfw/ip_fw_sockopt.c
index 9d67dc0..e25b960 100644
--- a/sys/netinet/ipfw/ip_fw_sockopt.c
+++ b/sys/netinet/ipfw/ip_fw_sockopt.c
@@ -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
OpenPOWER on IntegriCloud