diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2014-07-12 18:44:44 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2014-07-12 18:44:44 +0000 |
commit | 48b6cac396e42c57b5037f5a67d6cd7afb1733d6 (patch) | |
tree | 29d721c60c102e5fb6ed78e8ad45bbda321c951f /sys/netinet6/ip6_mroute.c | |
parent | a29a93ecbd0d69878182d5959b330ae5badcadc7 (diff) |
add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.
Diffstat (limited to 'sys/netinet6/ip6_mroute.c')
-rw-r--r-- | sys/netinet6/ip6_mroute.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index e2b66ff2af9..60128a14fee 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -497,12 +497,12 @@ ip6_mrouter_done(void) struct rtdetq *n = rte->next; m_freem(rte->m); - free(rte, M_MRTABLE); + free(rte, M_MRTABLE, 0); rte = n; } frt = rt; rt = rt->mf6c_next; - free(frt, M_MRTABLE); + free(frt, M_MRTABLE, 0); } } @@ -793,7 +793,7 @@ add_m6fc(struct mf6cctl *mfccp) ip6_mdq(rte->m, rte->ifp, rt); } m_freem(rte->m); - free(rte, M_MRTABLE); + free(rte, M_MRTABLE, 0); rte = n; } rt->mf6c_stall = NULL; @@ -915,7 +915,7 @@ del_m6fc(struct mf6cctl *mfccp) } *nptr = rt->mf6c_next; - free(rt, M_MRTABLE); + free(rt, M_MRTABLE, 0); splx(s); @@ -1042,7 +1042,7 @@ ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m) (M_READONLY(mb0) || mb0->m_len < sizeof(struct ip6_hdr))) mb0 = m_pullup(mb0, sizeof(struct ip6_hdr)); if (mb0 == NULL) { - free(rte, M_MRTABLE); + free(rte, M_MRTABLE, 0); splx(s); return ENOBUFS; } @@ -1065,7 +1065,7 @@ ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m) rt = (struct mf6c *)malloc(sizeof(*rt), M_MRTABLE, M_NOWAIT); if (rt == NULL) { - free(rte, M_MRTABLE); + free(rte, M_MRTABLE, 0); m_freem(mb0); splx(s); return ENOBUFS; @@ -1077,9 +1077,9 @@ ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m) mm = m_copy(mb0, 0, sizeof(struct ip6_hdr)); if (mm == NULL) { - free(rte, M_MRTABLE); + free(rte, M_MRTABLE, 0); m_freem(mb0); - free(rt, M_MRTABLE); + free(rt, M_MRTABLE, 0); splx(s); return ENOBUFS; } @@ -1100,9 +1100,9 @@ ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m) im->im6_mbz = 0; break; default: - free(rte, M_MRTABLE); + free(rte, M_MRTABLE, 0); m_freem(mb0); - free(rt, M_MRTABLE); + free(rt, M_MRTABLE, 0); splx(s); return EINVAL; } @@ -1128,9 +1128,9 @@ ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m) log(LOG_WARNING, "ip6_mforward: ip6_mrouter " "socket queue full\n"); mrt6stat.mrt6s_upq_sockfull++; - free(rte, M_MRTABLE); + free(rte, M_MRTABLE, 0); m_freem(mb0); - free(rt, M_MRTABLE); + free(rt, M_MRTABLE, 0); splx(s); return ENOBUFS; } @@ -1162,7 +1162,7 @@ ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m) for (p = &rt->mf6c_stall; *p != NULL; p = &(*p)->next) if (++npkts > MAX_UPQ6) { mrt6stat.mrt6s_upq_ovflw++; - free(rte, M_MRTABLE); + free(rte, M_MRTABLE, 0); m_freem(mb0); splx(s); return 0; @@ -1229,14 +1229,14 @@ expire_upcalls(void *unused) do { struct rtdetq *n = rte->next; m_freem(rte->m); - free(rte, M_MRTABLE); + free(rte, M_MRTABLE, 0); rte = n; } while (rte != NULL); mrt6stat.mrt6s_cache_cleanups++; n6expire[i]--; *nptr = mfc->mf6c_next; - free(mfc, M_MRTABLE); + free(mfc, M_MRTABLE, 0); } else { nptr = &mfc->mf6c_next; } |