diff options
author | adrian <adrian@FreeBSD.org> | 2013-08-10 21:46:58 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2013-08-10 21:46:58 +0000 |
commit | 5c0ad988c9fafee15446d1771718c2401746b243 (patch) | |
tree | 8df412d8fdf12bb0ad5c4505855243b9bbcceb0d | |
parent | 58a6f3bcbe0e4af14ee8a6ac95181f4bddc558c3 (diff) | |
download | FreeBSD-src-5c0ad988c9fafee15446d1771718c2401746b243.zip FreeBSD-src-5c0ad988c9fafee15446d1771718c2401746b243.tar.gz |
Add in missing m_free()'s during error conditions.
-rw-r--r-- | sys/net80211/ieee80211_output.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index 7a88018..03c332a 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -396,6 +396,9 @@ ieee80211_start_pkt(struct ieee80211vap *vap, struct mbuf *m) * Start method for vap's. All packets from the stack come * through here. We handle common processing of the packets * before dispatching them to the underlying device. + * + * if_transmit() requires that the mbuf be consumed by this call + * regardless of the return condition. */ int ieee80211_vap_transmit(struct ifnet *ifp, struct mbuf *m) @@ -410,6 +413,7 @@ ieee80211_vap_transmit(struct ifnet *ifp, struct mbuf *m) "%s: ignore queue, parent %s not up+running\n", __func__, parent->if_xname); /* XXX stat */ + m_freem(m); return (EINVAL); } if (vap->iv_state == IEEE80211_S_SLEEP) { @@ -417,6 +421,7 @@ ieee80211_vap_transmit(struct ifnet *ifp, struct mbuf *m) * In power save, wakeup device for transmit. */ ieee80211_new_state(vap, IEEE80211_S_RUN, 0); + m_freem(m); return (0); } /* @@ -435,6 +440,7 @@ ieee80211_vap_transmit(struct ifnet *ifp, struct mbuf *m) vap->iv_stats.is_tx_badstate++; IEEE80211_UNLOCK(ic); ifp->if_drv_flags |= IFF_DRV_OACTIVE; + m_freem(m); return (EINVAL); } IEEE80211_UNLOCK(ic); |