diff options
| author | Ed Maste <emaste@FreeBSD.org> | 2026-06-05 21:01:39 +0000 |
|---|---|---|
| committer | Ed Maste <emaste@FreeBSD.org> | 2026-06-06 12:34:50 +0000 |
| commit | 232021fd093c6e65beee5c0b4281091902022d08 (patch) | |
| tree | d0515e0e07f860abf029bff14fe299e098c75faf | |
| parent | 5a7f41e94b6d47e60e5d76dfb3a61ee2746700ca (diff) | |
linuxkpi 802.11: Free entire mbuf chain on failure
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Fixes: 0936c648ad0ee ("LinuxKPI: 802.11: update the ni/lsta reference cycle")
Fixes: c816f64e66a0d ("LinuxKPI: 802.11: plug mbuf leak")
Differential Revision: https://reviews.freebsd.org/D57477
| -rw-r--r-- | sys/compat/linuxkpi/common/src/linux_80211.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index c6dcae2bffff..11f76c3ff5a5 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -5473,7 +5473,7 @@ lkpi_xmit(struct ieee80211_node *ni, struct mbuf *m, #endif LKPI_80211_LSTA_TXQ_UNLOCK(lsta); if (freem) - m_free(m); + m_freem(m); return (ENETDOWN); } @@ -5482,7 +5482,7 @@ lkpi_xmit(struct ieee80211_node *ni, struct mbuf *m, if (error != 0) { LKPI_80211_LSTA_TXQ_UNLOCK(lsta); if (freem) - m_free(m); + m_freem(m); #ifdef LINUXKPI_DEBUG_80211 if (linuxkpi_debug_80211 & D80211_TRACE_TX) ic_printf(ni->ni_ic, "%s: mbufq_enqueue failed: %d\n", |
