You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2016/10/26 23:08:15 UTC

[trafficserver] branch master updated: TS-5006: Fix CID 1364311

This is an automated email from the ASF dual-hosted git repository.

sorber pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/master by this push:
       new  b8d0663   TS-5006: Fix CID 1364311
b8d0663 is described below

commit b8d066338296ee7b9385fd40ebe29c0d19c7a0d8
Author: Phil Sorber <so...@apache.org>
AuthorDate: Wed Oct 26 11:03:00 2016 -0600

    TS-5006: Fix CID 1364311
    
    Set pointers to NULL after free.
---
 iocore/net/SSLConfig.cc | 31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)

diff --git a/iocore/net/SSLConfig.cc b/iocore/net/SSLConfig.cc
index f52a1b0..55997fe 100644
--- a/iocore/net/SSLConfig.cc
+++ b/iocore/net/SSLConfig.cc
@@ -98,22 +98,23 @@ SSLConfigParams::~SSLConfigParams()
 void
 SSLConfigParams::cleanup()
 {
-  ats_free_null(serverCertChainFilename);
-  ats_free_null(serverCACertFilename);
-  ats_free_null(serverCACertPath);
-  ats_free_null(clientCertPath);
-  ats_free_null(clientKeyPath);
-  ats_free_null(clientCACertFilename);
-  ats_free_null(clientCACertPath);
-  ats_free_null(configFilePath);
-  ats_free_null(serverCertPathOnly);
-  ats_free_null(serverKeyPathOnly);
-  ats_free_null(cipherSuite);
-  ats_free_null(client_cipherSuite);
-  ats_free_null(dhparamsFile);
-  ats_free_null(ssl_wire_trace_ip);
-  ats_free_null(ticket_key_filename);
+  serverCertChainFilename = (char *)ats_free_null(serverCertChainFilename);
+  serverCACertFilename    = (char *)ats_free_null(serverCACertFilename);
+  serverCACertPath        = (char *)ats_free_null(serverCACertPath);
+  clientCertPath          = (char *)ats_free_null(clientCertPath);
+  clientKeyPath           = (char *)ats_free_null(clientKeyPath);
+  clientCACertFilename    = (char *)ats_free_null(clientCACertFilename);
+  clientCACertPath        = (char *)ats_free_null(clientCACertPath);
+  configFilePath          = (char *)ats_free_null(configFilePath);
+  serverCertPathOnly      = (char *)ats_free_null(serverCertPathOnly);
+  serverKeyPathOnly       = (char *)ats_free_null(serverKeyPathOnly);
+  cipherSuite             = (char *)ats_free_null(cipherSuite);
+  client_cipherSuite      = (char *)ats_free_null(client_cipherSuite);
+  dhparamsFile            = (char *)ats_free_null(dhparamsFile);
+  ssl_wire_trace_ip       = (IpAddr *)ats_free_null(ssl_wire_trace_ip);
+  ticket_key_filename     = (char *)ats_free_null(ticket_key_filename);
   ticket_block_free(default_global_keyblock);
+  default_global_keyblock = NULL;
 
   clientCertLevel = client_verify_depth = verify_depth = clientVerify = 0;
 }

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].