]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Made Coverity happier after Bug 4864 fix (#371)
authorAlex Rousskov <rousskov@measurement-factory.com>
Thu, 21 Feb 2019 21:56:48 +0000 (21:56 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sat, 23 Feb 2019 21:57:41 +0000 (21:57 +0000)
... by addressing the following false-positive:
CID 1442832: Null pointer dereferences (FORWARD_NULL)

The Comm::IsConnOpen() test guarantees that connManager is not nil. An
explicit assert() might reduce bugs when this code is refactored.

src/FwdState.cc

index 301da5a4a65ec5541a00ed385e7c778c8809e137..3c9cedada5908bd60c819df881840b1c6ee3a276 100644 (file)
@@ -971,6 +971,7 @@ FwdState::usePinned()
     ++n_tries;
     request->flags.pinned = true;
 
+    assert(connManager);
     if (connManager->pinnedAuth())
         request->flags.auth = true;