git: 74f750004990 - stable/14 - sctp: initialize inp to avoid uninitialized use

Michael Tuexen <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src,gmane.os.freebsd.devel.stable.scm
Message-ID <[email protected]>
The branch stable/14 has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=74f75000499001ea7e8e8261b56f2b0538e2125c

commit 74f75000499001ea7e8e8261b56f2b0538e2125c
Author:     Bjoern A. Zeeb <[email protected]>
AuthorDate: 2026-04-18 13:25:18 +0000
Commit:     Michael Tuexen <[email protected]>
CommitDate: 2026-08-06 05:59:01 +0000

    sctp: initialize inp to avoid uninitialized use
    
    If we take an early goto out_unlocked inp is uninitialized and then
    may be used in SCTP_LTRACE_ERR_RET().  Initialize inp to NULL
    to avoid warnings.
    
    Found with:     gcc15 tinderbox build
    Reviewed by:    tuexen, pouria
    Differential Revision: https://reviews.freebsd.org/D56503
    
    (cherry picked from commit 4cdbcc2b6a2e551529f7133665ef406869b48bf7)
---
 sys/netinet/sctp_output.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index 2a3c0248be60..ef589d266134 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -12601,6 +12601,7 @@ sctp_lower_sosend(struct socket *so,
 	error = 0;
 	net = NULL;
 	stcb = NULL;
+	inp = NULL;
 
 	if ((uio == NULL) && (top == NULL)) {
 		error = EINVAL;
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.