summaryrefslogtreecommitdiff
path: root/net/mac80211/ethtool.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2018-05-18 12:40:44 +0300
committerJohannes Berg <johannes.berg@intel.com>2018-05-18 12:40:44 +0300
commit0fdf1493b41eb64fc7e8c8e1b8830a4bd8c4bbca (patch)
treedfa33dd2675c2cb313fd9a9d22baf6478efe9367 /net/mac80211/ethtool.c
parent39c1134c66b4552f665da576cb625f184a44a8a3 (diff)
downloadlinux-0fdf1493b41eb64fc7e8c8e1b8830a4bd8c4bbca.tar.xz
mac80211: allocate and fill tidstats only when needed
This fixes memory leaks in the case where we just have the station info on the stack for internal usage without sending it to cfg80211. Fixes: 8689c051a201 ("cfg80211: dynamically allocate per-tid stats for station info") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/ethtool.c')
-rw-r--r--net/mac80211/ethtool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/ethtool.c b/net/mac80211/ethtool.c
index 2ba5686cbcab..690c142a7a44 100644
--- a/net/mac80211/ethtool.c
+++ b/net/mac80211/ethtool.c
@@ -108,7 +108,7 @@ static void ieee80211_get_stats(struct net_device *dev,
goto do_survey;
memset(&sinfo, 0, sizeof(sinfo));
- sta_set_sinfo(sta, &sinfo);
+ sta_set_sinfo(sta, &sinfo, false);
i = 0;
ADD_STA_STATS(sta);
@@ -135,7 +135,7 @@ static void ieee80211_get_stats(struct net_device *dev,
continue;
memset(&sinfo, 0, sizeof(sinfo));
- sta_set_sinfo(sta, &sinfo);
+ sta_set_sinfo(sta, &sinfo, false);
i = 0;
ADD_STA_STATS(sta);
}