------------------------------------------------------------ revno: 14003 revision-id: squid3@treenet.co.nz-20160323131731-2myugkam9gkm9xos parent: squidadm@squid-cache.org-20160315181415-zqh4v3mv1k9h80fs author: William Lima committer: Amos Jeffries branch nick: 3.5 timestamp: Thu 2016-03-24 02:17:31 +1300 message: Fix memory leak when the cache of sslcrtvalidator_program is disabled via ttl=0 ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20160323131731-2myugkam9gkm9xos # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 # testament_sha1: e4da7b55e5ee30792284c97c5ce0488f30bba1bf # timestamp: 2016-03-23 13:50:56 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 # base_revision_id: squidadm@squid-cache.org-20160315181415-\ # zqh4v3mv1k9h80fs # # Begin patch === modified file 'src/ssl/helper.cc' --- src/ssl/helper.cc 2016-01-06 14:32:07 +0000 +++ src/ssl/helper.cc 2016-03-23 13:17:31 +0000 @@ -243,7 +243,8 @@ if (Ssl::CertValidationHelper::HelperCache && (validationResponse->resultCode == ::Helper::Okay || validationResponse->resultCode == ::Helper::Error)) { Ssl::CertValidationResponse::Pointer *item = new Ssl::CertValidationResponse::Pointer(validationResponse); - Ssl::CertValidationHelper::HelperCache->add(crtdvdData->query.c_str(), item); + if (!Ssl::CertValidationHelper::HelperCache->add(crtdvdData->query.c_str(), item)) + delete item; } SSL_free(crtdvdData->ssl);