git: 6dfd710963da - main - unix: Fix a missing initialization in uipc_sosend_stream_or_seqpacket()

Mark Johnston <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a7a0d0a.40c42.98f01f1__18045.7430471264$1786383740$gmane$org@gitrepo.freebsd.org>
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=6dfd710963da7fe6086bcfb705b32b6a3646848f

commit 6dfd710963da7fe6086bcfb705b32b6a3646848f
Author:     Mark Johnston <[email protected]>
AuthorDate: 2026-08-10 14:41:04 +0000
Commit:     Mark Johnston <[email protected]>
CommitDate: 2026-08-10 17:31:21 +0000

    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
---
 sys/kern/uipc_usrreq.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.