mirror of
https://github.com/opnsense/src.git
synced 2026-05-20 08:56:47 -04:00
LinuxKPI: 802.11: plug a ni leak in lkpi_sta_assoc_to_run()
In lkpi_sta_assoc_to_run() we are going through some code segments twice (auth->assoc, assoc->authorized). The 2nd time we shall not re-gain a reference on the net80211 node as otherwise it'll leak. Likewise we do not have to re-set lsta and sta. Sponsored by: The FreeBSD Foundation MFC after: 3 days
This commit is contained in:
parent
5e383e3603
commit
71df58aefc
1 changed files with 0 additions and 3 deletions
|
|
@ -1590,12 +1590,9 @@ lkpi_sta_assoc_to_run(struct ieee80211vap *vap, enum ieee80211_state nstate, int
|
|||
}
|
||||
|
||||
/* Update sta_state (ASSOC to AUTHORIZED). */
|
||||
ni = ieee80211_ref_node(vap->iv_bss);
|
||||
lsta = ni->ni_drv_data;
|
||||
KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni));
|
||||
KASSERT(lsta->state == IEEE80211_STA_ASSOC, ("%s: lsta %p state not "
|
||||
"ASSOC: %#x\n", __func__, lsta, lsta->state));
|
||||
sta = LSTA_TO_STA(lsta);
|
||||
error = lkpi_80211_mo_sta_state(hw, vif, sta, IEEE80211_STA_AUTHORIZED);
|
||||
if (error != 0) {
|
||||
IMPROVE("undo some changes?");
|
||||
|
|
|
|||
Loading…
Reference in a new issue