]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 2323 (again): basic auth leaks memory
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 13 Jun 2008 13:36:53 +0000 (01:36 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 13 Jun 2008 13:36:53 +0000 (01:36 +1200)
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 992ca0ebd6e689f2cff43d4feeb4527282eabcd7..4d4988b1079c4e837731f6b9122c64b32a54a5c0 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 91c25544902159e3ccc69907620832a9078349dd..c8f6ea67cc3616a04d3451bebb8504b68eaacc5a 100644 (file)
@@ -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 */