aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/mac80211/sta_info.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index f05244dc773e..cba8309e9ace 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -652,10 +652,12 @@ static int __must_check __sta_info_destroy(struct sta_info *sta)
652 if (ret) 652 if (ret)
653 return ret; 653 return ret;
654 654
655 mutex_lock(&local->key_mtx);
655 for (i = 0; i < NUM_DEFAULT_KEYS; i++) 656 for (i = 0; i < NUM_DEFAULT_KEYS; i++)
656 ieee80211_key_free(local, sta->gtk[i]); 657 __ieee80211_key_free(sta->gtk[i]);
657 if (sta->ptk) 658 if (sta->ptk)
658 ieee80211_key_free(local, sta->ptk); 659 __ieee80211_key_free(sta->ptk);
660 mutex_unlock(&local->key_mtx);
659 661
660 sta->dead = true; 662 sta->dead = true;
661 663