mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
wpa_supplicant : fix invalid de-init of last_scan_res_used
During the wifi deinit last_scan_res_used is not set to 0 which will cause it be used directly after reinit. Added changes which will set it to 0 during init and deinit.
This commit is contained in:
parent
0ec506961e
commit
a36991d7a9
@ -95,6 +95,7 @@ void esp_scan_init(struct wpa_supplicant *wpa_s)
|
||||
wpa_s->scanning = 0;
|
||||
wpa_bss_init(wpa_s);
|
||||
wpa_s->last_scan_res = NULL;
|
||||
wpa_s->last_scan_res_used = 0;
|
||||
}
|
||||
|
||||
void esp_scan_deinit(struct wpa_supplicant *wpa_s)
|
||||
@ -102,6 +103,7 @@ void esp_scan_deinit(struct wpa_supplicant *wpa_s)
|
||||
wpa_bss_deinit(wpa_s);
|
||||
os_free(wpa_s->last_scan_res);
|
||||
wpa_s->last_scan_res = NULL;
|
||||
wpa_s->last_scan_res_used = 0;
|
||||
}
|
||||
|
||||
int esp_handle_beacon_probe(u8 type, u8 *frame, size_t len, u8 *sender,
|
||||
|
Loading…
Reference in New Issue
Block a user