mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
fix(wifi): fix esp_wifi_scan_start memory leakage issue
Closes https://github.com/espressif/esp-idf/issues/10693
This commit is contained in:
@@ -304,6 +304,7 @@ static bool wifi_perform_scan(const char *ssid, bool internal)
|
||||
g_ap_list_buffer = malloc(g_scan_ap_num * sizeof(wifi_ap_record_t));
|
||||
if (g_ap_list_buffer == NULL) {
|
||||
ESP_LOGE(TAG_STA, "Failed to malloc buffer to print scan results");
|
||||
esp_wifi_clear_ap_list();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user