mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
qcacld-3.0: Fix memleak in wlan_hdd_cfg80211_do_acs
__wlan_hdd_cfg80211_do_acs mallocs memory of adapter->session.ap.sap_config.acs_cfg.ch_list without checking and free original memory. If hostapd is killed by -9, and interface wlan0 keep on. wlan_hdd_cfg80211_stop_ap and wlan_hdd_undo_acs isn't called, acs_cfg.ch_list memory isn't freed. if hostapd is started again, __wlan_hdd_cfg80211_do_acs is called again, malloc memory of acs_cfg.ch_list again, last malloced memory is leaked Change-Id: Ia45615aa75841381b13a2f779cb5d355526d78a2 CRs-Fixed: 2150040
This commit is contained in:
parent
e5e02df5df
commit
069a61d7a5
1 changed files with 2 additions and 0 deletions
|
|
@ -2526,6 +2526,8 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
sap_config = &adapter->session.ap.sap_config;
|
||||
if (sap_config->acs_cfg.ch_list)
|
||||
qdf_mem_free(sap_config->acs_cfg.ch_list);
|
||||
qdf_mem_zero(&sap_config->acs_cfg, sizeof(struct sap_acs_cfg));
|
||||
|
||||
status = hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_ACS_MAX, data, data_len,
|
||||
|
|
|
|||
Loading…
Reference in a new issue