mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 12:28:58 +00:00
If tcp_output() is unable to allocate space for a copy of the data waiting
to be sent, just clean up and return ENOBUFS rather than silently proceeding without sending any of the data. This makes it consistent with the `#ifdef notyet' case immediately above. Reviewed by: Andras Olah <olah@freebsd.org> Obtained from: Lite-2
This commit is contained in:
parent
02c78a9c21
commit
51823c3a93
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=10712
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)tcp_output.c 8.3 (Berkeley) 12/30/93
|
||||
* $Id: tcp_output.c,v 1.10 1995/05/09 13:35:47 davidg Exp $
|
||||
* $Id: tcp_output.c,v 1.11 1995/05/30 08:09:56 rgrimes Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -486,8 +486,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) {
|
||||
m_free(m);
|
||||
error = ENOBUFS;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user