diff --git a/esphome/components/http_request/http_request.h b/esphome/components/http_request/http_request.h index df6bc7dea7..6281adddb6 100644 --- a/esphome/components/http_request/http_request.h +++ b/esphome/components/http_request/http_request.h @@ -149,6 +149,7 @@ template class HttpRequestSendAction : public Action { } response_body.reserve(read_index); response_body.assign((char *) buf, read_index); + allocator.deallocate(buf, max_length); } }