From: Amos Jeffries Date: Sun, 30 Aug 2015 20:36:48 +0000 (-0700) Subject: Fix regression in rev.14268 X-Git-Tag: SQUID_4_0_1~83 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=67cbbef0c8ae18d6f50c479ea2dc70012840bd48;p=thirdparty%2Fsquid.git Fix regression in rev.14268 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. --- diff --git a/src/acl/Checklist.h b/src/acl/Checklist.h index bae3e8efce..4ccbb4f0c7 100644 --- a/src/acl/Checklist.h +++ b/src/acl/Checklist.h @@ -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: