This is an automated email from the ASF dual-hosted git repository.
cmcfarlen pushed a commit to branch 9.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.2.x by this push:
new 58dabd53f6 Fix memory leak when loading remap config (#11959)
58dabd53f6 is described below
commit 58dabd53f6de19c985acdd74fb81ce400e6e9671
Author: Chris McFarlen <[email protected]>
AuthorDate: Wed Jan 15 11:15:36 2025 -0600
Fix memory leak when loading remap config (#11959)
Co-authored-by: Chris McFarlen <[email protected]>
---
proxy/http/remap/RemapConfig.cc | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/proxy/http/remap/RemapConfig.cc b/proxy/http/remap/RemapConfig.cc
index 747831869e..d1e1326a63 100644
--- a/proxy/http/remap/RemapConfig.cc
+++ b/proxy/http/remap/RemapConfig.cc
@@ -91,6 +91,14 @@ BUILD_TABLE_INFO::BUILD_TABLE_INFO()
BUILD_TABLE_INFO::~BUILD_TABLE_INFO()
{
this->reset();
+
+ // clean up any leftover named filter rules
+ auto *rp = rules_list;
+ while (rp != nullptr) {
+ auto *tmp = rp->next;
+ delete rp;
+ rp = tmp;
+ }
}
void