freebsd11_wlan: Drain ageq before cleaning it up.

The comment above ieee80211_ageq_cleanup specifically notes that the queue
is assumed to be empty, and in order to make it so, ieee80211_ageq_drain
must be used.

Possibly helps with #3180, as this might be a source of mbuf leakage.
This commit is contained in:
Augustin Cavalier
2018-07-16 20:00:17 -04:00
parent 8959d55643
commit dffc3e2353
@@ -134,6 +134,9 @@ ieee80211_node_detach(struct ieee80211com *ic)
callout_drain(&ic->ic_inact); callout_drain(&ic->ic_inact);
ieee80211_node_table_cleanup(&ic->ic_sta); ieee80211_node_table_cleanup(&ic->ic_sta);
#ifdef __HAIKU__
ieee80211_ageq_drain(&ic->ic_stageq);
#endif
ieee80211_ageq_cleanup(&ic->ic_stageq); ieee80211_ageq_cleanup(&ic->ic_stageq);
} }