Do not allocate zero-length mbuf in sosend_generic().
Found by: pho Sponsored by: Nginx, Inc.
This commit is contained in:
parent
dc61566f95
commit
67af272bcf
@ -1310,7 +1310,7 @@ restart:
|
|||||||
resid = 0;
|
resid = 0;
|
||||||
if (flags & MSG_EOR)
|
if (flags & MSG_EOR)
|
||||||
top->m_flags |= M_EOR;
|
top->m_flags |= M_EOR;
|
||||||
} else {
|
} else if (resid > 0) {
|
||||||
/*
|
/*
|
||||||
* Copy the data from userland into a mbuf
|
* Copy the data from userland into a mbuf
|
||||||
* chain. If no data is to be copied in,
|
* chain. If no data is to be copied in,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user