summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1995-06-19 17:22:01 +0000
committerwollman <wollman@FreeBSD.org>1995-06-19 17:22:01 +0000
commit4133e8a26cda3a473fd685674c861906bd6fb58c (patch)
tree9f8696fed6448d281b44dfdcd2ca6914d9d5e8e3 /sys/netinet
parent0c180bc68dad77998226a4a36c7ae7d8bf0fb36e (diff)
downloadFreeBSD-src-4133e8a26cda3a473fd685674c861906bd6fb58c.zip
FreeBSD-src-4133e8a26cda3a473fd685674c861906bd6fb58c.tar.gz
Fix a resource allocation bug where multicast forwarding would leak mbufs
in certain cases when allocation of another mbuf has already failed. Submitted by: Bill Fenner <fenner@parc.xerox.com>
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_mroute.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c
index 2abb1e1..0b8bc7f 100644
--- a/sys/netinet/ip_mroute.c
+++ b/sys/netinet/ip_mroute.c
@@ -1206,7 +1206,7 @@ X_ip_mforward(ip, ifp, m, imo)
MGET(mb_rt, M_DONTWAIT, MT_MRTABLE);
if (mb_rt == NULL) {
m_free(mb_ntry);
- m_free(mb0);
+ m_freem(mb0);
splx(s);
return ENOBUFS;
}
@@ -1216,7 +1216,7 @@ X_ip_mforward(ip, ifp, m, imo)
mm = m_pullup(mm, hlen);
if (mm == NULL) {
m_free(mb_ntry);
- m_free(mb0);
+ m_freem(mb0);
m_free(mb_rt);
splx(s);
return ENOBUFS;
@@ -1238,7 +1238,7 @@ X_ip_mforward(ip, ifp, m, imo)
log(LOG_WARNING, "ip_mforward: ip_mrouter socket queue full");
++mrtstat.mrts_upq_sockfull;
m_free(mb_ntry);
- m_free(mb0);
+ m_freem(mb0);
m_free(mb_rt);
splx(s);
return ENOBUFS;
@@ -1269,7 +1269,7 @@ X_ip_mforward(ip, ifp, m, imo)
if (npkts > MAX_UPQ) {
mrtstat.mrts_upq_ovflw++;
m_free(mb_ntry);
- m_free(mb0);
+ m_freem(mb0);
splx(s);
return 0;
}
OpenPOWER on IntegriCloud