diff --git a/src/WebServer.cpp b/src/WebServer.cpp index 95c2dd69f..e72e55e13 100644 --- a/src/WebServer.cpp +++ b/src/WebServer.cpp @@ -32,8 +32,8 @@ bool ON_AP_FILTER(AsyncWebServerRequest *request) { AsyncWebServer::AsyncWebServer(uint16_t port) : _server(port) - , _rewrites(LinkedList([](AsyncWebRewrite* r){ delete r; })) - , _handlers(LinkedList([](AsyncWebHandler* h){ delete h; })) + , _rewrites(LinkedList(nullptr)) + , _handlers(LinkedList(nullptr)) { _catchAllHandler = new AsyncCallbackWebHandler(); if(_catchAllHandler == NULL)