aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ral
diff options
context:
space:
mode:
authorSepherosa Ziehau <sephe@FreeBSD.org>2007-04-19 13:09:57 +0000
committerSepherosa Ziehau <sephe@FreeBSD.org>2007-04-19 13:09:57 +0000
commitb03cfe239638b8b94b3e652a9184ffbf372ed25d (patch)
treefc56ac28bfefae2cf5891d951a7412389926f895 /sys/dev/ral
parentf1f73e57181121beb7ddf1fe5cf67609cf6eadc1 (diff)
downloadsrc-b03cfe239638b8b94b3e652a9184ffbf372ed25d.tar.gz
src-b03cfe239638b8b94b3e652a9184ffbf372ed25d.zip
Notes
Diffstat (limited to 'sys/dev/ral')
-rw-r--r--sys/dev/ral/rt2560.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/ral/rt2560.c b/sys/dev/ral/rt2560.c
index 0e3e8e57d8b8..36a849d94f27 100644
--- a/sys/dev/ral/rt2560.c
+++ b/sys/dev/ral/rt2560.c
@@ -1716,8 +1716,10 @@ rt2560_tx_raw(struct rt2560_softc *sc, struct mbuf *m0,
rate = params->ibp_rate0 & IEEE80211_RATE_VAL;
/* XXX validate */
- if (rate == 0)
+ if (rate == 0) {
+ m_freem(m0);
return EINVAL;
+ }
error = bus_dmamap_load_mbuf_sg(sc->prioq.data_dmat, data->map, m0,
segs, &nsegs, 0);
@@ -2782,11 +2784,15 @@ rt2560_raw_xmit(struct ieee80211_node *ni, struct mbuf *m,
/* prevent management frames from being sent if we're not ready */
if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
RAL_UNLOCK(sc);
+ m_freem(m);
+ ieee80211_free_node(ni);
return ENETDOWN;
}
if (sc->prioq.queued >= RT2560_PRIO_RING_COUNT) {
ifp->if_drv_flags |= IFF_DRV_OACTIVE;
RAL_UNLOCK(sc);
+ m_freem(m);
+ ieee80211_free_node(ni);
return ENOBUFS; /* XXX */
}