git: 4cdbcc2b6a2e - main - sctp: initialize inp to avoid uninitialized use
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 20 Apr 2026 11:16:35 UTC
The branch main has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=4cdbcc2b6a2e551529f7133665ef406869b48bf7
commit 4cdbcc2b6a2e551529f7133665ef406869b48bf7
Author: Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2026-04-18 13:25:18 +0000
Commit: Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2026-04-20 11:16:16 +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
MFC after: 3 days
Reviewed by: tuexen, pouria
Differential Revision: https://reviews.freebsd.org/D56503
---
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 4f6fbc6be783..85513d32fedf 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;