]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Reset TLS session unconditionally on PeerConnector errors
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 15 Jan 2017 11:33:10 +0000 (00:33 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 15 Jan 2017 11:33:10 +0000 (00:33 +1300)
The session state cleanup should be done regardless of library.

GnuTLS crash was the result of a bug elsewhere which is now fixed. So
remove mention of that.

src/security/PeerConnector.cc

index 5b199ab55b16d786abfe2a22be2bf5544de10a63..194a1bb032fd47278ebba1e5b02b57849583f6a0 100644 (file)
@@ -552,12 +552,9 @@ Security::PeerConnector::bail(ErrorState *error)
     // minimize the number of fd-closure notifications and let the recepient
     // manage the TCP state of the connection.
 
-#if USE_GNUTLS
-    // but we do need to release the bad TLS related details in fd_table
-    // ... or GnuTLS will SEGFAULT.
+    // but we should release the TLS session (if any)
     const int fd = serverConnection()->fd;
     Security::SessionClose(fd_table[fd].ssl, fd);
-#endif
 }
 
 void