summaryrefslogtreecommitdiffstats
path: root/net/mac80211/sta_info.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-05-27 22:33:57 +0200
committerJohannes Berg <johannes.berg@intel.com>2014-05-28 16:22:41 +0200
commit53d045258ee2e38b1e882617cb0799a04d05f5fa (patch)
tree77b23f71aa45a9ecc2c361073415042b41e44bc2 /net/mac80211/sta_info.c
parenta9fb54169b197f31aff24c8d6270dd1e56cde395 (diff)
downloadlinux-53d045258ee2e38b1e882617cb0799a04d05f5fa.tar.bz2
mac80211: fix a memory leak on sta rate selection table
If the rate control algorithm uses a selection table, it is leaked when the station is destroyed - fix that. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Reported-by: Christophe Prévotaux <cprevotaux@nltinc.com> Fixes: 0d528d85c519 ("mac80211: improve the rate control API") Cc: stable@vger.kernel.org # v3.10+ [add commit log entry, remove pointless NULL check] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r--net/mac80211/sta_info.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index c34a5f97abc7..be9120fb8448 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -240,6 +240,7 @@ void sta_info_free(struct ieee80211_local *local, struct sta_info *sta)
sta_dbg(sta->sdata, "Destroyed STA %pM\n", sta->sta.addr);
+ kfree(rcu_dereference_raw(sta->sta.rates));
kfree(sta);
}