summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r--sys/netinet/tcp_output.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index b98f5a7d9dd..600f6bad8d5 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_output.c,v 1.2 1996/03/03 22:30:46 niklas Exp $ */
+/* $OpenBSD: tcp_output.c,v 1.3 1996/03/14 08:06:57 tholo Exp $ */
/* $NetBSD: tcp_output.c,v 1.14 1996/02/13 23:43:53 christos Exp $ */
/*
@@ -329,10 +329,10 @@ send:
* Adjust data length if insertion of options will
* bump the packet length beyond the t_maxseg length.
*/
- if (len > tp->t_maxseg - optlen) {
+ if (len > tp->t_maxseg - optlen) {
len = tp->t_maxseg - optlen;
- flags &= ~TH_FIN;
sendalot = 1;
+ flags &= ~TH_FIN;
}
#ifdef DIAGNOSTIC
@@ -380,8 +380,11 @@ send:
m->m_len += len;
} else {
m->m_next = m_copy(so->so_snd.sb_mb, off, (int) len);
- if (m->m_next == 0)
- len = 0;
+ if (m->m_next == 0) {
+ (void) m_free(m);
+ error = ENOBUFS;
+ goto out;
+ }
}
#endif
/*