This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push: new 271038db6d Fixed some memory leaks with http/3 (#9336) (#9375) 271038db6d is described below commit 271038db6d18f7c7ec8b96f55e6f9a895fafc868 Author: Bryan Call <bc...@apache.org> AuthorDate: Thu Feb 2 18:05:02 2023 -0800 Fixed some memory leaks with http/3 (#9336) (#9375) (cherry picked from commit a776a9f4e92de6b5b9e6b9fbea6537c962d69cbc) --- proxy/http3/Http3HeaderFramer.cc | 8 ++++++++ proxy/http3/Http3HeaderFramer.h | 1 + proxy/http3/Http3Session.cc | 1 + 3 files changed, 10 insertions(+) diff --git a/proxy/http3/Http3HeaderFramer.cc b/proxy/http3/Http3HeaderFramer.cc index 9cd17a17cd..38d15e7c82 100644 --- a/proxy/http3/Http3HeaderFramer.cc +++ b/proxy/http3/Http3HeaderFramer.cc @@ -36,6 +36,14 @@ Http3HeaderFramer::Http3HeaderFramer(Http3Transaction *transaction, VIO *source, http_parser_init(&this->_http_parser); } +Http3HeaderFramer::~Http3HeaderFramer() +{ + _header.destroy(); + if (_header_block != nullptr) { + free_MIOBuffer(_header_block); + } +} + Http3FrameUPtr Http3HeaderFramer::generate_frame() { diff --git a/proxy/http3/Http3HeaderFramer.h b/proxy/http3/Http3HeaderFramer.h index 98f77ab3c9..7a36905475 100644 --- a/proxy/http3/Http3HeaderFramer.h +++ b/proxy/http3/Http3HeaderFramer.h @@ -38,6 +38,7 @@ class Http3HeaderFramer : public Http3FrameGenerator { public: Http3HeaderFramer(Http3Transaction *transaction, VIO *source, QPACK *qpack, uint64_t stream_id); + ~Http3HeaderFramer(); // Http3FrameGenerator Http3FrameUPtr generate_frame() override; diff --git a/proxy/http3/Http3Session.cc b/proxy/http3/Http3Session.cc index ac0416da15..cf543c2bc4 100644 --- a/proxy/http3/Http3Session.cc +++ b/proxy/http3/Http3Session.cc @@ -55,6 +55,7 @@ void HQSession::remove_transaction(HQTransaction *trans) { this->_transaction_list.remove(trans); + delete trans; return; }