From fe924e06e56c3aea2a1110bf68b69635bb8e27f3 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 10 Aug 2013 22:47:42 +0200 Subject: [PATCH] Stop leaking X509 structures. --- indra/newview/llsechandler_basic.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp index e1c70169fa..9667776112 100755 --- a/indra/newview/llsechandler_basic.cpp +++ b/indra/newview/llsechandler_basic.cpp @@ -1049,6 +1049,12 @@ void LLBasicCertificateStore::validate(int validation_policy, throw LLInvalidCertificate((*current_cert)); } std::string sha1_hash((const char *)cert_x509->sha1_hash, SHA_DIGEST_LENGTH); + + // LLBasicCertificate::getOpenSSLX509 returns a copy made with X509_dup + X509_free( cert_x509 ); + cert_x509 = 0; + // + t_cert_cache::iterator cache_entry = mTrustedCertCache.find(sha1_hash); if(cache_entry != mTrustedCertCache.end()) {