Fix memory leak in WebServer (#914)

Fixes #908
This commit was merged in pull request #914.
This commit is contained in:
Earle F. Philhower, III
2022-10-12 11:25:56 -07:00
committed by GitHub
parent 98c4b921b8
commit e89ce78c79
2 changed files with 8 additions and 2 deletions
+4 -1
View File
@@ -280,7 +280,10 @@ void HTTPServer::httpHandleClient() {
}
if (!keepCurrentClient) {
_currentClient = nullptr;
if (_currentClient) {
delete _currentClient;
_currentClient = nullptr;
}
_currentStatus = HC_NONE;
_currentUpload.reset();
}