diff --git a/src/core/shuntingYard.cpp b/src/core/shuntingYard.cpp index 8d7755a72..b03f1ecd5 100644 --- a/src/core/shuntingYard.cpp +++ b/src/core/shuntingYard.cpp @@ -782,8 +782,8 @@ std::string compute(const std::string & expr) { expr_new.replace(f, e - f, result.c_str()); } http->end(); - delete http; } + delete http; } f = expr_new.find_first_of('{', e); } diff --git a/src/web/WebSchedulerService.cpp b/src/web/WebSchedulerService.cpp index ffdfc7db5..0af10870f 100644 --- a/src/web/WebSchedulerService.cpp +++ b/src/web/WebSchedulerService.cpp @@ -401,6 +401,7 @@ bool WebSchedulerService::command(const char * name, const std::string & command return true; } // we can add other json tests here + delete http; } doc.clear(); diff --git a/src/web/WebStatusService.cpp b/src/web/WebStatusService.cpp index 8cb9e5839..b160db0d8 100644 --- a/src/web/WebStatusService.cpp +++ b/src/web/WebStatusService.cpp @@ -245,6 +245,7 @@ void WebStatusService::action(AsyncWebServerRequest * request, JsonVariant json) if (!ok) { EMSESP::logger().err("Action '%s' failed", action.c_str()); request->send(400); // bad request + delete response; return; }