]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Initialize TunnelStateData::started in ctor (Coverity defect 1222663)
authorFrancesco Chemolli <kinkie@squid-cache.org>
Sat, 27 Jun 2015 17:13:26 +0000 (19:13 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Sat, 27 Jun 2015 17:13:26 +0000 (19:13 +0200)
src/tunnel.cc

index 349e824a3fdd5ebb508356df2f7fc0b1559084ba..46827c7c723dcc17e3854c27004cfdf02bd58de3 100644 (file)
@@ -271,7 +271,8 @@ TunnelStateData::TunnelStateData() :
     status_ptr(NULL),
     logTag_ptr(NULL),
     connectRespBuf(NULL),
-    connectReqWriting(false)
+    connectReqWriting(false),
+    started(squid_curtime)
 {
     debugs(26, 3, "TunnelStateData constructed this=" << this);
     client.readPendingFunc = &tunnelDelayedClientRead;
@@ -1006,7 +1007,7 @@ tunnelStart(ClientHttpRequest * http, int64_t * size_ptr, int *status_ptr, const
     tunnelState->client.conn = http->getConn()->clientConnection;
     tunnelState->http = http;
     tunnelState->al = al;
-    tunnelState->started = squid_curtime;
+    //tunnelState->started is set in TunnelStateData ctor
 
     comm_add_close_handler(tunnelState->client.conn->fd,
                            tunnelClientClosed,