From: Amos Jeffries Date: Fri, 13 Jan 2017 10:43:54 +0000 (+1300) Subject: Fix ParsedOptionsPointer for OpenSSL X-Git-Tag: M-staged-PR71~284^2~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7ae61630a00131611e25e51eeb2b05775faa7e1d;p=thirdparty%2Fsquid.git Fix ParsedOptionsPointer for OpenSSL --- diff --git a/src/security/PeerOptions.cc b/src/security/PeerOptions.cc index b5de37133b..a32826e857 100644 --- a/src/security/PeerOptions.cc +++ b/src/security/PeerOptions.cc @@ -470,7 +470,7 @@ Security::PeerOptions::parseOptions(Security::ParsedOptionsPointer &theOut) { #if USE_OPENSSL ::Parser::Tokenizer tok(sslOptions); - long op; + long op = 0; do { enum { @@ -531,7 +531,7 @@ Security::PeerOptions::parseOptions(Security::ParsedOptionsPointer &theOut) // compliance with RFC 6176: Prohibiting Secure Sockets Layer (SSL) Version 2.0 op = op | SSL_OP_NO_SSLv2; #endif - theOut = new long(op); + theOut.reset(new long(op)); #elif USE_GNUTLS const char *err = nullptr; diff --git a/src/security/forward.h b/src/security/forward.h index c087a7b435..d35510ec36 100644 --- a/src/security/forward.h +++ b/src/security/forward.h @@ -127,7 +127,7 @@ class KeyData; #if !USE_OPENSSL && USE_GNUTLS typedef std::unique_ptr> ParsedOptionsPointer; #else -typedef std::unique_ptr ParsedOptionsPointer; +typedef std::unique_ptr ParsedOptionsPointer; #endif class PeerConnector;