cmcfarlen commented on code in PR #12594:
URL: https://github.com/apache/trafficserver/pull/12594#discussion_r2452470569


##########
plugins/experimental/maxmind_acl/mmdb.h:
##########
@@ -71,6 +66,20 @@ class Acl
     if (db_loaded) {
       MMDB_close(&_mmdb);
     }
+    for (auto &i : allow_regex) {
+      for (auto &y : i.second) {
+        if (y._rex != nullptr) {
+          delete y._rex;
+        }
+      }
+    }
+    for (auto &i : deny_regex) {
+      for (auto &y : i.second) {
+        if (y._rex != nullptr) {
+          delete y._rex;
+        }
+      }
+    }

Review Comment:
   Could use shared_ptrs to refcount the instances, but I'm not sure how thread 
safe that would be.  @bryancall should Regex have a copy constructor?  Seems 
like somewhere else I saw needed to copy a Regex and ended up manually creating 
new and recompiling.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to