git: 29ab1cce6b3a - stable/15 - pf: fix sctp normalisation cleanup

From: Kristof Provost <kp_at_FreeBSD.org>
Date: Fri, 27 Nov 2026 12:23:25 UTC
The branch stable/15 has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=29ab1cce6b3aa290238eba6619ba8a4af5a8c418

commit 29ab1cce6b3aa290238eba6619ba8a4af5a8c418
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2026-11-19 13:14:36 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2026-11-27 12:22:40 +0000

    pf: fix sctp normalisation cleanup
    
    If we fail to allocate the dst scrub structure we should free the src
    one too, but we passed src rather than src->scrub.
    
    Reported by:    llm-postcr
    MFC after:      1 week
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
    
    (cherry picked from commit e53632189f09d7b5c6664fef51cbe4429e4b3243)
---
 sys/netpfil/pf/pf_norm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c
index 93d40641eb80..e8f7cc2f601f 100644
--- a/sys/netpfil/pf/pf_norm.c
+++ b/sys/netpfil/pf/pf_norm.c
@@ -1583,7 +1583,7 @@ pf_normalize_sctp_init(struct pf_pdesc *pd, struct pf_state_peer *src,
 
 	dst->scrub = uma_zalloc(V_pf_state_scrub_z, M_ZERO | M_NOWAIT);
 	if (dst->scrub == NULL) {
-		uma_zfree(V_pf_state_scrub_z, src);
+		uma_zfree(V_pf_state_scrub_z, src->scrub);
 		return (1);
 	}