From 7df0e4fada5d2953bae9bca7797626a25a784757 Mon Sep 17 00:00:00 2001 From: CaCO3 Date: Thu, 28 Dec 2023 16:44:57 +0100 Subject: [PATCH] fix delete See https://stackoverflow.com/questions/7510603/what-is-difference-between-new-and-new1 --- code/components/jomjol_wlan/connect_wlan.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/components/jomjol_wlan/connect_wlan.cpp b/code/components/jomjol_wlan/connect_wlan.cpp index 085e4b676..603751265 100644 --- a/code/components/jomjol_wlan/connect_wlan.cpp +++ b/code/components/jomjol_wlan/connect_wlan.cpp @@ -378,7 +378,7 @@ void wifi_scan(void) else { if (esp_wifi_scan_get_ap_records(&max_number_of_ap_found, wifi_ap_records) != ESP_OK) { // Retrieve results (and free internal heap) LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "wifi_scan: esp_wifi_scan_get_ap_records: Error retrieving datasets"); - delete wifi_ap_records; + delete[] wifi_ap_records; return; } } @@ -401,7 +401,7 @@ void wifi_scan(void) APWithBetterRSSI = true; } } - delete wifi_ap_records; + delete[] wifi_ap_records; }