summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-07-05 20:42:19 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-07-05 20:42:19 +0000
commitc44192a94f0d8da061001911722412cc96133ffa (patch)
tree81f5511b9b033b96d1c295a779b8886d1f5d6b64
parent1d561aafd8ecfb44f42fafb570244a576e23ce18 (diff)
release temporary binding if M_PREPEND fails; netbsd pr#2605; tegge@idt.unit.no; improved by me
-rw-r--r--sys/netinet/udp_usrreq.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index dde51578f84..f78e4be2d7f 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udp_usrreq.c,v 1.6 1996/05/15 09:03:12 mickey Exp $ */
+/* $OpenBSD: udp_usrreq.c,v 1.7 1996/07/05 20:42:18 deraadt Exp $ */
/* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */
/*
@@ -457,7 +457,7 @@ udp_output(m, va_alist)
M_PREPEND(m, sizeof(struct udpiphdr), M_DONTWAIT);
if (m == 0) {
error = ENOBUFS;
- goto release;
+ goto bail;
}
/*
@@ -490,6 +490,7 @@ udp_output(m, va_alist)
inp->inp_socket->so_options & (SO_DONTROUTE | SO_BROADCAST),
inp->inp_moptions);
+bail:
if (addr) {
in_pcbdisconnect(inp);
inp->inp_laddr = laddr;