summaryrefslogtreecommitdiffstats
path: root/sys/dev/ath/if_ath.c
diff options
context:
space:
mode:
authorsephe <sephe@FreeBSD.org>2007-04-19 13:09:57 +0000
committersephe <sephe@FreeBSD.org>2007-04-19 13:09:57 +0000
commitf9d2951cadf7da6eb5345a1c593b6389e5abe53b (patch)
treefc56ac28bfefae2cf5891d951a7412389926f895 /sys/dev/ath/if_ath.c
parente8a77bd9270dfbfa30aa44607f5f3ecb4e70ee3e (diff)
downloadFreeBSD-src-f9d2951cadf7da6eb5345a1c593b6389e5abe53b.zip
FreeBSD-src-f9d2951cadf7da6eb5345a1c593b6389e5abe53b.tar.gz
- Fix mbuf/node leakage in drivers' raw_xmit().
- For ural(4): o Fix node leakage in ural_start(), if ural_tx_mgt() fails. o Fix mbuf leakage in ural_tx_{mgt,data}(), if usbd_transfer() fails. o In ural_tx_{mgt,data}(), set ural_tx_data.{m,ni} to NULL, if usbd_transfer() fails, so they will not be freed again in ural_stop(). Approved by: sam (mentor)
Diffstat (limited to 'sys/dev/ath/if_ath.c')
-rw-r--r--sys/dev/ath/if_ath.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index f3907b6..1ef2138 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -5838,6 +5838,7 @@ ath_raw_xmit(struct ieee80211_node *ni, struct mbuf *m,
struct ath_buf *bf;
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || sc->sc_invalid) {
+ ieee80211_free_node(ni);
m_freem(m);
return ENETDOWN;
}
@@ -5854,6 +5855,7 @@ ath_raw_xmit(struct ieee80211_node *ni, struct mbuf *m,
__func__);
sc->sc_stats.ast_tx_qstop++;
ifp->if_drv_flags |= IFF_DRV_OACTIVE;
+ ieee80211_free_node(ni);
m_freem(m);
return ENOBUFS;
}
OpenPOWER on IntegriCloud