summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-05-27 22:33:57 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-09 11:21:28 -0700
commit699012e1775dbf7b971e9bcf3269fa83fab4aa0f (patch)
tree4e1df3b6fd9e83b36051fba77e285a4e7a84b4df /net
parent1c95722fa828807fe982ed8ecbfcf74657e8d630 (diff)
downloadlwn-699012e1775dbf7b971e9bcf3269fa83fab4aa0f.tar.gz
lwn-699012e1775dbf7b971e9bcf3269fa83fab4aa0f.zip
mac80211: fix a memory leak on sta rate selection table
commit 53d045258ee2e38b1e882617cb0799a04d05f5fa upstream. 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") [add commit log entry, remove pointless NULL check] Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-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 847d92f6bef6..8f8c11583630 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);
}