aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/ath/if_ath.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index 4166bb73d697..26b1060b5a18 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -3320,6 +3320,9 @@ nextfrag:
*
* Note: if this fails, then the mbufs are freed but
* not the node reference.
+ *
+ * So, we now have to free the node reference ourselves here
+ * and return OK up to the stack.
*/
next = m->m_nextpkt;
if (ath_tx_start(sc, ni, bf, m)) {
@@ -3336,7 +3339,14 @@ reclaim:
*/
ath_txfrag_cleanup(sc, &frags, ni);
ATH_TXBUF_UNLOCK(sc);
- retval = ENOBUFS;
+
+ /*
+ * XXX: And free the node/return OK; ath_tx_start() may have
+ * modified the buffer. We currently have no way to
+ * signify that the mbuf was freed but there was an error.
+ */
+ ieee80211_free_node(ni);
+ retval = 0;
goto finish;
}