]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Reduce Pointer refcounting in forwarding (#592)
authorAmos Jeffries <yadij@users.noreply.github.com>
Mon, 20 Apr 2020 01:06:54 +0000 (01:06 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Tue, 21 Apr 2020 05:02:08 +0000 (05:02 +0000)
Remove temporary Pointer copy which confused Coverity scan
into thinking there is a double-free. Should resolve Issue #1461170
and maybe others.

src/FwdState.cc
src/FwdState.h

index 91e0412e13617865cb781cffac6b6ae793910655..e08781d9a07b0e4440c9c2ffc15bacd898990207 100644 (file)
@@ -1353,7 +1353,7 @@ aclFindNfMarkConfig(acl_nfmark * head, ACLChecklist * ch)
 }
 
 void
-getOutgoingAddress(HttpRequest * request, Comm::ConnectionPointer conn)
+getOutgoingAddress(HttpRequest * request, const Comm::ConnectionPointer &conn)
 {
     // skip if an outgoing address is already set.
     if (!conn->local.isAnyAddr()) return;
index ae1434d08b8cd046eb28404fd77cbf1f293b480c..6881726747b4b3d13d2699793e4971d1f0629673 100644 (file)
@@ -197,7 +197,7 @@ private:
     PconnRace pconnRace; ///< current pconn race state
 };
 
-void getOutgoingAddress(HttpRequest * request, Comm::ConnectionPointer conn);
+void getOutgoingAddress(HttpRequest * request, const Comm::ConnectionPointer &conn);
 
 /// a collection of previously used persistent Squid-to-peer HTTP(S) connections
 extern PconnPool *fwdPconnPool;