mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-07 20:00:53 +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:
@@ -812,6 +812,7 @@ static esp_err_t update_wifi_scan_results(void)
|
||||
prov_ctx->ap_list[curr_channel] = (wifi_ap_record_t *) calloc(get_count, sizeof(wifi_ap_record_t));
|
||||
if (!prov_ctx->ap_list[curr_channel]) {
|
||||
ESP_LOGE(TAG, "Failed to allocate memory for AP list");
|
||||
esp_wifi_clear_ap_list();
|
||||
goto exit;
|
||||
}
|
||||
if (esp_wifi_scan_get_ap_records(&get_count, prov_ctx->ap_list[curr_channel]) != ESP_OK) {
|
||||
|
Reference in New Issue
Block a user