Stop leaking X509 structures.

meow-7.2.2
Nicky 2013-08-10 22:47:42 +02:00
parent 3b0f5a01da
commit fe924e06e5
1 changed files with 6 additions and 0 deletions

View File

@ -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);
// <FS:ND> LLBasicCertificate::getOpenSSLX509 returns a copy made with X509_dup
X509_free( cert_x509 );
cert_x509 = 0;
// </FS:ND>
t_cert_cache::iterator cache_entry = mTrustedCertCache.find(sha1_hash);
if(cache_entry != mTrustedCertCache.end())
{