Repository: trafficserver Updated Branches: refs/heads/master 9693a2311 -> 3d96360eb
[TS-3257]: Fix ssl handshake buffer memory leak introduced in TS-3006 Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/4077cef2 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/4077cef2 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/4077cef2 Branch: refs/heads/master Commit: 4077cef23805694b54fbf7a9e6b0ab2854cfa6a9 Parents: 9693a23 Author: Sudheer Vinukonda <[email protected]> Authored: Tue Dec 23 15:35:38 2014 +0000 Committer: Sudheer Vinukonda <[email protected]> Committed: Tue Dec 23 15:35:38 2014 +0000 ---------------------------------------------------------------------- iocore/net/P_SSLNetVConnection.h | 13 +++++++++---- iocore/net/SSLNetVConnection.cc | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4077cef2/iocore/net/P_SSLNetVConnection.h ---------------------------------------------------------------------- diff --git a/iocore/net/P_SSLNetVConnection.h b/iocore/net/P_SSLNetVConnection.h index c481c8b..77a3034 100644 --- a/iocore/net/P_SSLNetVConnection.h +++ b/iocore/net/P_SSLNetVConnection.h @@ -155,10 +155,15 @@ public: this->handShakeHolder = this->handShakeReader->clone(); } void free_handshake_buffers() { - - this->handShakeReader->dealloc(); - this->handShakeHolder->dealloc(); - free_MIOBuffer(this->handShakeBuffer); + if (this->handShakeReader) { + this->handShakeReader->dealloc(); + } + if (this->handShakeHolder) { + this->handShakeHolder->dealloc(); + } + if (this->handShakeBuffer) { + free_MIOBuffer(this->handShakeBuffer); + } this->handShakeReader = NULL; this->handShakeHolder = NULL; this->handShakeBuffer = NULL; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4077cef2/iocore/net/SSLNetVConnection.cc ---------------------------------------------------------------------- diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc index 871c5a0..1c63002 100644 --- a/iocore/net/SSLNetVConnection.cc +++ b/iocore/net/SSLNetVConnection.cc @@ -815,6 +815,7 @@ SSLNetVConnection::free(EThread * t) { hookOpRequested = TS_SSL_HOOK_OP_DEFAULT; npnSet = NULL; npnEndpoint= NULL; + free_handshake_buffers(); if (from_accept_thread) { sslNetVCAllocator.free(this);
