From a845077c96d70b55afa68df770eec61e7f71d5d2 Mon Sep 17 00:00:00 2001 From: limes007 <39467727+limes007@users.noreply.github.com> Date: Tue, 20 Feb 2024 14:09:50 +0000 Subject: [PATCH] delete my_ssid to free memory --- lib/webserver/esp-fs-webserver.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/webserver/esp-fs-webserver.cpp b/lib/webserver/esp-fs-webserver.cpp index 6f7d628..af613c2 100644 --- a/lib/webserver/esp-fs-webserver.cpp +++ b/lib/webserver/esp-fs-webserver.cpp @@ -205,6 +205,7 @@ IPAddress FSWebServer::startWiFi(uint32_t timeout, const char *apSSID, const cha { ip = WiFi.localIP(); WiFi.persistent(true); + delete[] my_ssid; return ip; } // If no connection after a while go in Access Point mode @@ -223,6 +224,8 @@ IPAddress FSWebServer::startWiFi(uint32_t timeout, const char *apSSID, const cha Serial.print(F("\nAP mode.\nServer IP address: ")); Serial.println(ip); Serial.println(); + + delete[] my_ssid; return ip; }