mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-07-29 01:52:51 +00:00
fix possible memory leaks
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user