aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2026-06-05 20:56:51 +0000
committerEd Maste <emaste@FreeBSD.org>2026-06-06 12:32:40 +0000
commit5a7f41e94b6d47e60e5d76dfb3a61ee2746700ca (patch)
tree4646413f04847b8838cf527fbc9cffecc006d4a5
parent8d9dff23f206cb86aed9857a985ed09cd38eb5ac (diff)
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
-rw-r--r--sys/net/if_stf.c4
1 files 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);
}