This is an automated email from the ASF dual-hosted git repository. sorber pushed a commit to branch 6.2.x in repository https://git-dual.apache.org/repos/asf/trafficserver.git
commit 26d84663fef03488a27e8a021658b9af47fdbab3 Author: Alan M. Carroll <solidwallofc...@yahoo-inc.com> AuthorDate: Mon Apr 18 10:14:24 2016 -0500 TS-4046: Prevent memory leak of HTTP heap for server intercept case. This close #577. (cherry picked from commit 5abf6aca383e34b5aa1c0e3248936d858806acbe) --- proxy/hdrs/HTTP.h | 7 ++++--- proxy/http/HttpTransact.cc | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/proxy/hdrs/HTTP.h b/proxy/hdrs/HTTP.h index ae20b48..e457f61 100644 --- a/proxy/hdrs/HTTP.h +++ b/proxy/hdrs/HTTP.h @@ -507,7 +507,7 @@ public: int valid() const; void create(HTTPType polarity, HdrHeap *heap = NULL); - void clear(); + void destroy(); void reset(); void copy(const HTTPHdr *hdr); void copy_shallow(const HTTPHdr *hdr); @@ -796,12 +796,13 @@ HTTPHdr::create(HTTPType polarity, HdrHeap *heap) } inline void -HTTPHdr::clear() +HTTPHdr::destroy() { if (m_http && m_http->m_polarity == HTTP_TYPE_REQUEST) { m_url_cached.clear(); } - this->HdrHeapSDKHandle::clear(); + // Removing the only pointers to this data therefore it needs to get cleaned up or leak. + this->HdrHeapSDKHandle::destroy(); m_http = NULL; m_mime = NULL; } diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index d44ea88..1500f0a 100644 --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -934,7 +934,7 @@ done: HTTP_INCREMENT_DYN_STAT(http_invalid_client_requests_stat); TRANSACT_RETURN(SM_ACTION_SEND_ERROR_CACHE_NOOP, NULL); } else { - s->hdr_info.client_response.clear(); // anything previously set is invalid from this point forward + s->hdr_info.client_response.destroy(); // anything previously set is invalid from this point forward DebugTxn("http_trans", "END HttpTransact::EndRemapRequest"); if (s->is_upgrade_request && s->post_remap_upgrade_return_point) { -- To stop receiving notification emails like this one, please contact "commits@trafficserver.apache.org" <commits@trafficserver.apache.org>.