aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2026-08-10 14:41:04 +0000
committerMark Johnston <markj@FreeBSD.org>2026-08-10 17:31:21 +0000
commit6dfd710963da7fe6086bcfb705b32b6a3646848f (patch)
tree9f28e8db5cdb2a582253906461c6e2ec82174b52
parent8b668bc7e7c8b0a1bcb018360a4aafa445ff554f (diff)
unix: Fix a missing initialization in uipc_sosend_stream_or_seqpacket()
This could be triggered by an in-kernel sender, of which I can't find any examples. Fixes: d15792780760 ("unix: new implementation of unix/stream & unix/seqpacket") Reviewed by: glebius MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D58673
-rw-r--r--sys/kern/uipc_usrreq.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index a2069ca18c59..835daa09fc9a 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -1170,8 +1170,10 @@ uipc_sosend_stream_or_seqpacket(struct socket *so, struct sockaddr *addr,
eor ? M_EOR : 0);
if (__predict_false(error))
goto out2;
- } else
+ } else {
+ uio = NULL;
uipc_reset_kernel_mbuf(m, &mc);
+ }
error = SOCK_IO_SEND_LOCK(so, SBLOCKWAIT(flags));
if (error)