linuxkpi 802.11: Free entire mbuf chain on failure

Reviewed by:	bz
Sponsored by:	The FreeBSD Foundation
Fixes: 0936c648ad ("LinuxKPI: 802.11: update the ni/lsta reference cycle")
Fixes: c816f64e66 ("LinuxKPI: 802.11: plug mbuf leak")
Differential Revision: https://reviews.freebsd.org/D57477
This commit is contained in:
Ed Maste
2026-06-05 17:01:39 -04:00
parent 5a7f41e94b
commit 232021fd09
+2 -2
View File
@@ -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",