]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 2323 (again): basic auth leaks memory
authorAmos Jeffries <amosjeffries@squid-cache.org>
Fri, 13 Jun 2008 13:43:09 +0000 (07:43 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Fri, 13 Jun 2008 13:43:09 +0000 (07:43 -0600)
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.

src/ACLMaxUserIP.cc
src/ACLProxyAuth.cc
src/external_acl.cc

index b5fac9baa6d61b60209f4230858d45b2052c0909..5b9aff3ddddb933c5ae23aa5a587dbc1701571c8 100644 (file)
@@ -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;
 }
index b86aac744466043b8b1a3cd5d1846109bfafc1fc..354f8dceea2d465ddd070a69d0153ca045c883d2 100644 (file)
@@ -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;
 }
 
index 81b979cfe9be2d8fa10341046397d600430f0f30..eb890b3c2f27aa841f876e9b7025f1eb8e846de1 100644 (file)
@@ -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 */