aboutsummaryrefslogtreecommitdiff
path: root/sys/net80211/ieee80211_output.c
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2015-10-12 04:30:38 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2015-10-12 04:30:38 +0000
commitd3a4ade3b8232efc2338e59219d1cf108f6ee930 (patch)
treed270a0b32ce9aceeddcb5e0b590514b3f652a0fd /sys/net80211/ieee80211_output.c
parent940aa8080c249654c1e96546aaf3bd71554b814a (diff)
downloadsrc-d3a4ade3b8232efc2338e59219d1cf108f6ee930.tar.gz
src-d3a4ade3b8232efc2338e59219d1cf108f6ee930.zip
net80211: free node reference in the ieee80211_parent_xmitpkt() when error happened.
Move error handling into ieee80211_parent_xmitpkt() instead of spreading it between functions. Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3772
Notes
Notes: svn path=/head/; revision=289164
Diffstat (limited to 'sys/net80211/ieee80211_output.c')
-rw-r--r--sys/net80211/ieee80211_output.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c
index 149b726ce1fb..81d9eb192e36 100644
--- a/sys/net80211/ieee80211_output.c
+++ b/sys/net80211/ieee80211_output.c
@@ -132,7 +132,7 @@ ieee80211_vap_pkt_send_dest(struct ieee80211vap *vap, struct mbuf *m,
{
struct ieee80211com *ic = vap->iv_ic;
struct ifnet *ifp = vap->iv_ifp;
- int error, len, mcast;
+ int len, mcast;
if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) &&
(m->m_flags & M_PWR_SAV) == 0) {
@@ -264,18 +264,13 @@ ieee80211_vap_pkt_send_dest(struct ieee80211vap *vap, struct mbuf *m,
return (ENOBUFS);
}
}
- error = ieee80211_parent_xmitpkt(ic, m);
+ (void) ieee80211_parent_xmitpkt(ic, m);
/*
* Unlock at this point - no need to hold it across
* ieee80211_free_node() (ie, the comlock)
*/
IEEE80211_TX_UNLOCK(ic);
- if (error != 0) {
- /* NB: IFQ_HANDOFF reclaims mbuf */
- ieee80211_free_node(ni);
- if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
- }
ic->ic_lastdata = ticks;
return (0);