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