]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 2827: assertion failed: FilledChecklist.cc:90: "conn() != NULL"
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 22 Mar 2010 10:00:14 +0000 (23:00 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 22 Mar 2010 10:00:14 +0000 (23:00 +1300)
Assertion was bunk. We can happily continue without unlocking a
non-existent lock.

src/acl/FilledChecklist.cc

index 9b2c5005494bcb28623601423e192c6653384096..dad2ed501033dd7aad8d2dba2ff54cbd7e24a6ae 100644 (file)
@@ -86,15 +86,18 @@ ACLFilledChecklist::checkCallback(allow_t answer)
     if (auth_user_request) {
         /* the filled_checklist lock */
         AUTHUSERREQUESTUNLOCK(auth_user_request, "ACLFilledChecklist");
+
         /* it might have been connection based */
-        assert(conn() != NULL);
         /*
          * DPW 2007-05-08
          * yuck, this make me uncomfortable.  why do this here?
          * ConnStateData will do its own unlocking.
          */
-        AUTHUSERREQUESTUNLOCK(conn()->auth_user_request, "conn via ACLFilledChecklist");
-        conn()->auth_type = AUTH_BROKEN;
+        /* BUG 2827: the connection may also not exist. ie fast ACL tests vs client disconnection. */
+        if (conn()) {
+            AUTHUSERREQUESTUNLOCK(conn()->auth_user_request, "conn via ACLFilledChecklist");
+            conn()->auth_type = AUTH_BROKEN;
+        }
     }
 
     ACLChecklist::checkCallback(answer); // may delete us