svn commit: r274712 - head/sys/kern
Gleb Smirnoff
glebius at FreeBSD.org
Wed Nov 19 14:27:39 UTC 2014
Author: glebius
Date: Wed Nov 19 14:27:38 2014
New Revision: 274712
URL: https://svnweb.freebsd.org/changeset/base/274712
Log:
Do not allocate zero-length mbuf in sosend_generic().
Found by: pho
Sponsored by: Nginx, Inc.
Modified:
head/sys/kern/uipc_socket.c
Modified: head/sys/kern/uipc_socket.c
==============================================================================
--- head/sys/kern/uipc_socket.c Wed Nov 19 14:23:29 2014 (r274711)
+++ head/sys/kern/uipc_socket.c Wed Nov 19 14:27:38 2014 (r274712)
@@ -1310,7 +1310,7 @@ restart:
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,
More information about the svn-src-all
mailing list