Compare commits

..
3 Commits
Author SHA1 Message Date
Proddy 5b41217a67 Merge pull request #3187 from MichaelDvP/dev
workaround for memory leak, #3184
2026-08-09 09:04:39 +02:00
MichaelDvP 16caff789d Merge remote-tracking branch 'emsesp/dev' into dev 2026-08-07 12:42:02 +02:00
MichaelDvP 90f0c9c01b workaround for memory leak in setenv, #3184 2026-08-07 11:25:49 +02:00
3 changed files with 13 additions and 3 deletions
+1
View File
@@ -16,6 +16,7 @@ This release is based on the latest Espressif/Arduino core version 3. It brings
## Fixed
- shunting yard show json
- memory leak when using different timezones for ems-esp and thermostat[#3184](https://github.com/emsesp/EMS-ESP32/issues/3184)
- LED stayed off on a healthy system when "Disable LED" was unchecked
- Ethernet MAC address changed with the new SDK, breaking DHCP reservations (currently disabled)
- "IPv4 nameserver" showed an IPv6 address when IPv6 was in use
+11 -2
View File
@@ -77,13 +77,15 @@ void NTPSettings::read(NTPSettings & settings, JsonObject root) {
root["enabled"] = settings.enabled;
root["server"] = settings.server;
root["tz_label"] = settings.tzLabel;
root["tz_format"] = settings.tzFormat;
root["tz_format"] = settings.tzFormat.substring(0, settings.tzFormat.indexOf(" "));
root["thermostat_sync"] = settings.thermostat_sync;
root["tz_label_t"] = settings.tzLabelT;
root["tz_format_t"] = settings.tzFormatT;
root["tz_format_t"] = settings.tzFormatT.substring(0, settings.tzFormatT.indexOf(" "));
}
StateUpdateResult NTPSettings::update(JsonObject root, NTPSettings & settings) {
settings.tzFormat.reserve(40);
settings.tzFormatT.reserve(40);
settings.enabled = root["enabled"] | FACTORY_NTP_ENABLED;
settings.server = root["server"] | FACTORY_NTP_SERVER;
settings.tzLabel = root["tz_label"] | FACTORY_NTP_TIME_ZONE_LABEL;
@@ -91,5 +93,12 @@ StateUpdateResult NTPSettings::update(JsonObject root, NTPSettings & settings) {
settings.thermostat_sync = root["thermostat_sync"] | FACTORY_NTP_THERMOSTAT_SYNC;
settings.tzLabelT = root["tz_label_t"] | FACTORY_NTP_TIME_ZONE_LABEL;
settings.tzFormatT = root["tz_format_t"] | FACTORY_NTP_TIME_ZONE_FORMAT;
// The format string must have same length to avoid memory leak, #3184
while (settings.tzFormat.length() < 40) {
settings.tzFormat += " ";
}
while (settings.tzFormatT.length() < 40) {
settings.tzFormatT += " ";
}
return StateUpdateResult::CHANGED;
}
+1 -1
View File
@@ -1 +1 @@
#define EMSESP_APP_VERSION "3.9.0-dev.1"
#define EMSESP_APP_VERSION "3.9.0-dev.2"