summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjason <jason@openbsd.org>2001-01-31 08:28:47 +0000
committerjason <jason@openbsd.org>2001-01-31 08:28:47 +0000
commited9f8fa08cd9f7f80fd7bdb1d327014409c7ef0e (patch)
tree6f4916a799f89ab67a1dd9a309563e3c440fdc15
parentSwitch alpha to ELF. (diff)
downloadwireguard-openbsd-ed9f8fa08cd9f7f80fd7bdb1d327014409c7ef0e.tar.xz
wireguard-openbsd-ed9f8fa08cd9f7f80fd7bdb1d327014409c7ef0e.zip
oops, avoid mbuf lossage if MGETHDR fails
-rw-r--r--sys/netinet/ip_ether.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/ip_ether.c b/sys/netinet/ip_ether.c
index 341128d24de..3e2dd813d80 100644
--- a/sys/netinet/ip_ether.c
+++ b/sys/netinet/ip_ether.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ether.c,v 1.15 2001/01/31 05:43:07 jason Exp $ */
+/* $OpenBSD: ip_ether.c,v 1.16 2001/01/31 08:28:47 jason Exp $ */
/*
* The author of this code is Angelos D. Keromytis (kermit@adk.gr)
@@ -342,6 +342,7 @@ etherip_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip,
if (m0 == NULL) {
DPRINTF(("etherip_output(): M_GETHDR failed\n"));
etheripstat.etherip_adrops++;
+ m_free(m);
return ENOBUFS;
}
M_COPY_PKTHDR(m0, m);