From: Amos Jeffries Date: Fri, 13 Jun 2008 13:43:09 +0000 (-0600) Subject: Bug 2323 (again): basic auth leaks memory X-Git-Tag: SQUID_3_0_STABLE7~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a3728a48403277496f847d0c607c162cf5921a8;p=thirdparty%2Fsquid.git Bug 2323 (again): basic auth leaks memory This round was caused by a few missing unlocks causing objects to be incorrectly identified as in-use during garbage collection. Future cleanups really need to make these objects true RefCounted. --- diff --git a/src/ACLMaxUserIP.cc b/src/ACLMaxUserIP.cc index b5fac9baa6..5b9aff3ddd 100644 --- a/src/ACLMaxUserIP.cc +++ b/src/ACLMaxUserIP.cc @@ -163,7 +163,7 @@ ACLMaxUserIP::match(ACLChecklist *checklist) ti = match(checklist->auth_user_request, checklist->src_addr); - checklist->auth_user_request = NULL; + AUTHUSERREQUESTUNLOCK(checklist->auth_user_request, "ACLChecklist via ACLMaxUserIP"); return ti; } diff --git a/src/ACLProxyAuth.cc b/src/ACLProxyAuth.cc index b86aac7444..354f8dceea 100644 --- a/src/ACLProxyAuth.cc +++ b/src/ACLProxyAuth.cc @@ -215,7 +215,7 @@ ACLProxyAuth::matchProxyAuth(ACLChecklist *checklist) /* check to see if we have matched the user-acl before */ int result = cacheMatchAcl(&checklist->auth_user_request->user()-> proxy_match_cache, checklist); - checklist->auth_user_request = NULL; + AUTHUSERREQUESTUNLOCK(checklist->auth_user_request, "ACLChecklist via ACLProxyAuth"); return result; } diff --git a/src/external_acl.cc b/src/external_acl.cc index 81b979cfe9..eb890b3c2f 100644 --- a/src/external_acl.cc +++ b/src/external_acl.cc @@ -654,7 +654,7 @@ aclMatchExternal(external_acl_data *acl, ACLChecklist * ch) key = makeExternalAclKey(ch, acl); if (acl->def->require_auth) - ch->auth_user_request = NULL; + AUTHUSERREQUESTUNLOCK(ch->auth_user_request, "ACLChecklist via aclMatchExternal"); if (!key) { /* Not sufficient data to process */