Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Unified Diff: net/cert/cert_verify_proc_mac.cc

Issue 886933008: Fix a memory leak in net::CertVerifyProcMac::VerifyInternal (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/valgrind/memcheck/suppressions_mac.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/cert_verify_proc_mac.cc
diff --git a/net/cert/cert_verify_proc_mac.cc b/net/cert/cert_verify_proc_mac.cc
index 4de10f288c65dc8cff2eb030a2d44afe8b394fde..43edfd1eff1d57b5400a27837f11712b50d03fa2 100644
--- a/net/cert/cert_verify_proc_mac.cc
+++ b/net/cert/cert_verify_proc_mac.cc
@@ -490,8 +490,9 @@ int CertVerifyProcMac::VerifyInternal(
// array of certificates, the first of which is the certificate we're
// verifying, and the subsequent (optional) certificates are used for
// chain building.
- ScopedCFTypeRef<CFMutableArrayRef> cert_array(CFArrayCreateMutableCopy(
- kCFAllocatorDefault, 0, cert->CreateOSCertChainForCert()));
+ ScopedCFTypeRef<CFArrayRef> original_chain(cert->CreateOSCertChainForCert());
davidben 2015/02/05 22:14:34 It looks like CreateOSCertChainForCert makes a CFM
Ryan Sleevi 2015/02/05 22:49:40 I considered that, but we have this same function
+ ScopedCFTypeRef<CFMutableArrayRef> cert_array(
+ CFArrayCreateMutableCopy(kCFAllocatorDefault, 0, original_chain));
// Serialize all calls that may use the Keychain, to work around various
// issues in OS X 10.6+ with multi-threaded access to Security.framework.
« no previous file with comments | « no previous file | tools/valgrind/memcheck/suppressions_mac.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698