git: 0ab8bd1eee93 - stable/15 - sctp: initialize inp to avoid uninitialized use

From: Michael Tuexen <tuexen_at_FreeBSD.org>
Date: Fri, 23 Oct 2026 15:40:32 UTC
The branch stable/15 has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=0ab8bd1eee9362e23953d2fbf89d9ffef0cdcc74

commit 0ab8bd1eee9362e23953d2fbf89d9ffef0cdcc74
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2026-04-18 13:25:18 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2026-10-23 15:39:08 +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 e4bdb4291972..7b7de7c681be 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -12599,6 +12599,7 @@ sctp_lower_sosend(struct socket *so,
 	error = 0;
 	net = NULL;
 	stcb = NULL;
+	inp = NULL;
 
 	if ((uio == NULL) && (top == NULL)) {
 		error = EINVAL;