From: Amos Jeffries Date: Fri, 13 Jun 2008 13:36:53 +0000 (+1200) Subject: Bug 2323 (again): basic auth leaks memory X-Git-Tag: SQUID_3_1_0_1~49^2~206 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5d2796f2dcba6b417f6128ee7bbfd720038816b6;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 992ca0ebd6..4d4988b107 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 91c2554490..c8f6ea67cc 100644 --- a/src/external_acl.cc +++ b/src/external_acl.cc @@ -677,7 +677,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 */