summaryrefslogtreecommitdiffstats
path: root/sys/net/if_vlan.c
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2002-04-04 05:42:09 +0000
committerluigi <luigi@FreeBSD.org>2002-04-04 05:42:09 +0000
commit55510cb673dc4635f4bc6393c11f3d63f6d00ed6 (patch)
tree5169d68ccee6707c197fe9453bd1ece3b92a55b2 /sys/net/if_vlan.c
parent1802268e809bb1895682a238b5d7c63858a55166 (diff)
downloadFreeBSD-src-55510cb673dc4635f4bc6393c11f3d63f6d00ed6.zip
FreeBSD-src-55510cb673dc4635f4bc6393c11f3d63f6d00ed6.tar.gz
Fix a couple of incorrect m_free() vs. m_freem() usages and related issues.
Reviewed-by: brooks
Diffstat (limited to 'sys/net/if_vlan.c')
-rw-r--r--sys/net/if_vlan.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index 2d142d7..d3bbdd8 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -389,7 +389,8 @@ vlan_input_tag(struct ether_header *eh, struct mbuf *m, u_int16_t t)
}
if (ifv == NULL || (ifv->ifv_if.if_flags & IFF_UP) == 0) {
- m_free(m);
+ m->m_pkthdr.rcvif->if_noproto++;
+ m_freem(m);
return -1; /* So the parent can take note */
}
@@ -419,6 +420,7 @@ vlan_input(struct ether_header *eh, struct mbuf *m)
}
if (ifv == NULL || (ifv->ifv_if.if_flags & IFF_UP) == 0) {
+ m->m_pkthdr.rcvif->if_noproto++;
m_freem(m);
return -1; /* so ether_input can take note */
}
OpenPOWER on IntegriCloud