The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5a7f41e94b6d47e60e5d76dfb3a61ee2746700ca
commit 5a7f41e94b6d47e60e5d76dfb3a61ee2746700ca Author: Ed Maste <[email protected]> AuthorDate: 2026-06-05 20:56:51 +0000 Commit: Ed Maste <[email protected]> CommitDate: 2026-06-06 12:32:40 +0000 if_stf: Free entire mbuf chain on failure Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai Reviewed by: markj, bz, kp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57476 --- sys/net/if_stf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c index c6eea784e158..e35866e4ed99 100644 --- a/sys/net/if_stf.c +++ b/sys/net/if_stf.c @@ -801,13 +801,13 @@ in_stf_input(struct mbuf *m, int off, int proto, void *arg) */ nh = fib6_lookup(sc->sc_fibnum, &ip6->ip6_dst, 0, 0, 0); if (nh == NULL) { - m_free(m); + m_freem(m); SDT_PROBE2(if_stf, , stf_input, out, IPPROTO_DONE, __LINE__); return (IPPROTO_DONE); } if ((nh->nh_ifp == ifp) && (!IN6_ARE_ADDR_EQUAL(&ip6->ip6_src, &nh->gw6_sa.sin6_addr))) { - m_free(m); + m_freem(m); SDT_PROBE2(if_stf, , stf_input, out, IPPROTO_DONE, __LINE__); return (IPPROTO_DONE); }
