This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.1.x by this push:
new 5f6e6be fix mem leak in session cache (#7707)
5f6e6be is described below
commit 5f6e6be7bfd733ed54404bde70453a0c84ea62b0
Author: Fei Deng <[email protected]>
AuthorDate: Thu Apr 15 11:48:50 2021 -0500
fix mem leak in session cache (#7707)
(cherry picked from commit 221878dbf6524acab269739f8e8b1b0a722b30e6)
---
iocore/net/SSLSessionCache.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/iocore/net/SSLSessionCache.cc b/iocore/net/SSLSessionCache.cc
index 60ec19e..22cd3ae 100644
--- a/iocore/net/SSLSessionCache.cc
+++ b/iocore/net/SSLSessionCache.cc
@@ -270,6 +270,7 @@ void inline SSLSessionBucket::removeOldestSession(const
std::unique_lock<std::sh
auto node = bucket_data_ts.begin();
bucket_data.erase(node->second->session_id);
+ delete node->second;
bucket_data_ts.erase(node);
PRINT_BUCKET("removeOldestSession after")
@@ -287,6 +288,7 @@ SSLSessionBucket::removeSession(const SSLSessionID &id)
if (node != bucket_data.end()) {
bucket_data_ts.erase(node->second->time_stamp);
+ delete node->second;
bucket_data.erase(node);
}