]> git.ipfire.org Git - thirdparty/squid.git/commit - src/acl/FilledChecklist.cc
Bug 4088: memory leak in external_acl_type helper with cache=0 or ttl=0
authorAmos Jeffries <squid3@treenet.co.nz>
Wed, 8 Oct 2014 15:51:28 +0000 (08:51 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 8 Oct 2014 15:51:28 +0000 (08:51 -0700)
commitabdd93d06e0c0a8e17eb8a0195eced6a71909fb7
tree05b28d97659e3bf343415fc5a339791f76ffe475
parent502bcc7bfb87d3bfa866760d1fa6432097d9962c
Bug 4088: memory leak in external_acl_type helper with cache=0 or ttl=0

ExternalACLEntry / external_acl_entry objects have been abusing the
CBDATA API for reference counting and since 3.4 this has resulted in
hidden memory leaks as object accounting shows all locks released but
the memory is not freed by any 'owner'.

* convert to using RefCount<> API.

* move ExternalACLEntry pre-define to acl/forward.h

* add ExternalACLEntryPointer in acl/forward.h

* convert LookupDone() method to using explicit typed pointer

* convert from CBDATA_CLASS to MEMPROXY_CLASS memory management.

* convert almost all raw ExternalACLEntry* to Pointer
 - remaining usage is in the cache hash pointers. Use an explicit 'cachd'
  lock/unlock until this hash is updated to std:: structure types.
src/ExternalACL.h
src/ExternalACLEntry.cc
src/ExternalACLEntry.h
src/acl/FilledChecklist.cc
src/acl/FilledChecklist.h
src/acl/forward.h
src/external_acl.cc