cfg80211: release station info tidstats where needed
This fixes memory leaks in cases where we got the station
info but failed sending it out properly.
Fixes: 8689c051a2
("cfg80211: dynamically allocate per-tid stats for station info")
Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
@@ -5710,6 +5710,19 @@ void cfg80211_remain_on_channel_expired(struct wireless_dev *wdev, u64 cookie,
|
||||
*/
|
||||
int cfg80211_sinfo_alloc_tid_stats(struct station_info *sinfo, gfp_t gfp);
|
||||
|
||||
/**
|
||||
* cfg80211_sinfo_release_content - release contents of station info
|
||||
* @sinfo: the station information
|
||||
*
|
||||
* Releases any potentially allocated sub-information of the station
|
||||
* information, but not the struct itself (since it's typically on
|
||||
* the stack.)
|
||||
*/
|
||||
static inline void cfg80211_sinfo_release_content(struct station_info *sinfo)
|
||||
{
|
||||
kfree(sinfo->pertid);
|
||||
}
|
||||
|
||||
/**
|
||||
* cfg80211_new_sta - notify userspace about station
|
||||
*
|
||||
|
Reference in New Issue
Block a user