mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-22 07:00:50 +07:00
ath10k: add cleanup in ath10k_sta_state()
If 'sta->tdls' is false, no cleanup is executed, leading to memory/resource leaks, e.g., 'arsta->tx_stats'. To fix this issue, perform cleanup before go to the 'exit' label. Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
c41305993f
commit
334f5b61a6
@ -6559,8 +6559,12 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
|
||||
|
||||
spin_unlock_bh(&ar->data_lock);
|
||||
|
||||
if (!sta->tdls)
|
||||
if (!sta->tdls) {
|
||||
ath10k_peer_delete(ar, arvif->vdev_id, sta->addr);
|
||||
ath10k_mac_dec_num_stations(arvif, sta);
|
||||
kfree(arsta->tx_stats);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
ret = ath10k_wmi_update_fw_tdls_state(ar, arvif->vdev_id,
|
||||
WMI_TDLS_ENABLE_ACTIVE);
|
||||
|
Loading…
Reference in New Issue
Block a user