]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix ACL-related reconfiguration memory leak (#859)
authorAlex Rousskov <rousskov@measurement-factory.com>
Sun, 11 Jul 2021 19:24:14 +0000 (19:24 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sun, 11 Jul 2021 19:24:17 +0000 (19:24 +0000)
Leaking since commit 4eac340 that migrated from statically-allocated
ACLStrategy<...>::Instance_ objects to dynamically allocated ones.

Most ACLStrategy objects have no data members, probably leaking just one
virtual table pointer (per named ACL), but strategies that support ACL
(data) --options, like ACLDestinationDomainStrategy and
ACLServerNameStrategy, leak memory used for options storage.

src/acl/Strategised.h

index 0d3b4b8d19007af4bf85b5c6e80edf25d5107836..b933257cf602dd07c73d09dd23d0421566c927fe 100644 (file)
@@ -64,6 +64,7 @@ template <class MatchType>
 ACLStrategised<MatchType>::~ACLStrategised()
 {
     delete data;
+    delete matcher;
 }
 
 template <class MatchType>