]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix regression in rev.14268
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 30 Aug 2015 20:36:48 +0000 (13:36 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 30 Aug 2015 20:36:48 +0000 (13:36 -0700)
My bad cut-n-paste resulted in wrong locking sequence.
Fixing that reveals that the validity check on the return
result triggers cases of cbdata 'locks > 0' assertions.
The validity test is not currently needed by the fastCheck
code which preserves the value. So removing for now.

src/acl/Checklist.h

index bae3e8efce88197a45a1c7a2f5466dbf82d4b0c4..4ccbb4f0c780e9215c0625f9188e326c215be888 100644 (file)
@@ -165,14 +165,14 @@ public:
     virtual bool hasReply() const = 0;
 
     /// change the current ACL list
-    /// \return a pointer to the old list, or NULL if that is no longer CBDATA-valid
+    /// \return a pointer to the old list value (may be nullptr)
     const Acl::Tree *changeAcl(const Acl::Tree *t) {
         const Acl::Tree *old = accessList;
         if (t != accessList) {
-            accessList = cbdataReference(t);
             cbdataReferenceDone(accessList);
+            accessList = cbdataReference(t);
         }
-        return cbdataReferenceValid(old) ? old : nullptr;
+        return old;
     }
 
 private: