Fixed a previously documented leak of ACLs related to adaptation access rules. === modified file 'src/adaptation/AccessRule.cc' --- src/adaptation/AccessRule.cc 2013-05-13 22:48:23 +0000 +++ src/adaptation/AccessRule.cc 2014-04-24 20:12:30 +0000 @@ -1,37 +1,38 @@ #include "squid.h" +#include "acl/Tree.h" #include "acl/Gadgets.h" #include "adaptation/AccessRule.h" #include "adaptation/Service.h" #include "adaptation/ServiceGroups.h" #include "ConfigParser.h" #include "Debug.h" int Adaptation::AccessRule::LastId = 0; Adaptation::AccessRule::AccessRule(const String &aGroupId): id(++LastId), groupId(aGroupId), acl(NULL) { } Adaptation::AccessRule::~AccessRule() { - // XXX: leaking acls here? + delete acl; } void Adaptation::AccessRule::parse(ConfigParser &parser) { aclParseAccessLine("adaptation_access", parser, &acl); } void Adaptation::AccessRule::finalize() { if (!group()) { // no explicit group debugs(93,7, HERE << "no service group: " << groupId); // try to add a one-service group if (FindService(groupId) != NULL) { ServiceGroupPointer g = new SingleService(groupId); g->finalize(); // explicit groups were finalized before rules AllGroups().push_back(g); } }