From a457db44474f0c41f957f46313a3849ecd6c5b1e Mon Sep 17 00:00:00 2001 From: Ollo Date: Sun, 14 Nov 2021 13:51:52 +0100 Subject: [PATCH] Fixed memory leak --- esp32/src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esp32/src/main.cpp b/esp32/src/main.cpp index 4aa2a1a..918f310 100644 --- a/esp32/src/main.cpp +++ b/esp32/src/main.cpp @@ -208,7 +208,7 @@ void readOneWireSensors() continue; } - char buf[sizeof(ds18b20Address) * 2]; + char buf[(sizeof(ds18b20Address) * 2)+1]; /* additional byte for trailing terminator */ snprintf(buf, sizeof(buf), "%.2X%.2X%.2X%.2X%.2X%.2X%.2X%.2X", ds18b20Address[0], ds18b20Address[1],