summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/uipc_socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index 1cd2206..240421f 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -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,
OpenPOWER on IntegriCloud