iwi, ral, zyd: fix possible use-after-free.
MFC after: 5 days
This commit is contained in:
parent
e36b831f4b
commit
ce017db11c
@ -1979,9 +1979,9 @@ iwi_start(struct iwi_softc *sc)
|
||||
}
|
||||
ni = (struct ieee80211_node *) m->m_pkthdr.rcvif;
|
||||
if (iwi_tx_start(sc, m, ni, ac) != 0) {
|
||||
ieee80211_free_node(ni);
|
||||
if_inc_counter(ni->ni_vap->iv_ifp,
|
||||
IFCOUNTER_OERRORS, 1);
|
||||
ieee80211_free_node(ni);
|
||||
break;
|
||||
}
|
||||
sc->sc_tx_timer = 5;
|
||||
|
@ -1616,9 +1616,9 @@ rt2661_start(struct rt2661_softc *sc)
|
||||
}
|
||||
ni = (struct ieee80211_node *) m->m_pkthdr.rcvif;
|
||||
if (rt2661_tx_data(sc, m, ni, ac) != 0) {
|
||||
ieee80211_free_node(ni);
|
||||
if_inc_counter(ni->ni_vap->iv_ifp,
|
||||
IFCOUNTER_OERRORS, 1);
|
||||
ieee80211_free_node(ni);
|
||||
break;
|
||||
}
|
||||
sc->sc_tx_timer = 5;
|
||||
|
@ -2582,10 +2582,10 @@ zyd_start(struct zyd_softc *sc)
|
||||
while (sc->tx_nfree > 0 && (m = mbufq_dequeue(&sc->sc_snd)) != NULL) {
|
||||
ni = (struct ieee80211_node *)m->m_pkthdr.rcvif;
|
||||
if (zyd_tx_start(sc, m, ni) != 0) {
|
||||
ieee80211_free_node(ni);
|
||||
m_freem(m);
|
||||
if_inc_counter(ni->ni_vap->iv_ifp,
|
||||
IFCOUNTER_OERRORS, 1);
|
||||
ieee80211_free_node(ni);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user