git: 85195c0c7f8a - main - ipsec: Free entire mbuf chain on failure
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 06 Jun 2026 12:36:20 UTC
The branch main has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=85195c0c7f8a2926f0ba131178d9231bc33c81b5
commit 85195c0c7f8a2926f0ba131178d9231bc33c81b5
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2026-06-05 20:51:48 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2026-06-06 12:35:47 +0000
ipsec: Free entire mbuf chain on failure
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57475
---
sys/netipsec/ipsec_output.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/netipsec/ipsec_output.c b/sys/netipsec/ipsec_output.c
index b394ff81d9c6..18a25c0feeff 100644
--- a/sys/netipsec/ipsec_output.c
+++ b/sys/netipsec/ipsec_output.c
@@ -462,7 +462,7 @@ ipsec4_common_output(struct ifnet *ifp, struct mbuf *m, struct inpcb *inp,
if (((m->m_flags & M_PKTHDR) != 0 && m->m_pkthdr.len < sizeof(*ip)) ||
((m->m_flags & M_PKTHDR) == 0 && m->m_len < sizeof(*ip))) {
- m_free(m);
+ m_freem(m);
return (EACCES);
}
if (ip1 != NULL) {