trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shinr...@apache.org
Subject trafficserver git commit: TS-3554: Fix coverity discovered memory leak.
Date Fri, 24 Apr 2015 17:48:21 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master 4a39facf5 -> 86a3a1464


TS-3554: Fix coverity discovered memory leak.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/86a3a146
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/86a3a146
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/86a3a146

Branch: refs/heads/master
Commit: 86a3a1464c32b24f02e2633906b93916f0080536
Parents: 4a39fac
Author: shinrich <shinrich@yahoo-inc.com>
Authored: Fri Apr 24 12:47:21 2015 -0500
Committer: shinrich <shinrich@yahoo-inc.com>
Committed: Fri Apr 24 12:47:21 2015 -0500

----------------------------------------------------------------------
 iocore/net/SSLConfig.cc | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/86a3a146/iocore/net/SSLConfig.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLConfig.cc b/iocore/net/SSLConfig.cc
index 74908d3..242c5d2 100644
--- a/iocore/net/SSLConfig.cc
+++ b/iocore/net/SSLConfig.cc
@@ -358,15 +358,18 @@ SSLCertificateConfig::reconfigure()
   }
 
   SSLParseCertificateConfiguration(params, lookup);
+
+  if (!lookup->is_valid) {
+    retStatus = false;
+  }
   // If there are errors in the certificate configs and we had wanted to exit on error
   // we won't want to reset the config
   if (lookup->is_valid || !params->configExitOnLoadError) {
     configid = configProcessor.set(configid, lookup);
+  } else {
+    delete lookup;
   }
 
-  if (!lookup->is_valid) {
-    retStatus = false;
-  }
   return retStatus;
 }
 


Mime
View raw message