Index: net/base/x509_certificate_win.cc |
diff --git a/net/base/x509_certificate_win.cc b/net/base/x509_certificate_win.cc |
index a02db9b7b4fe06262ef55579b28b0f8dc85aab1c..23f423067a501c403c1bfb4de09cc7c9f8eb2b60 100644 |
--- a/net/base/x509_certificate_win.cc |
+++ b/net/base/x509_certificate_win.cc |
@@ -482,8 +482,11 @@ X509Certificate* X509Certificate::CreateFromPickle(const Pickle& pickle, |
NULL, reinterpret_cast<const void **>(&cert_handle))) |
return NULL; |
- return CreateFromHandle(cert_handle, SOURCE_LONE_CERT_IMPORT, |
- OSCertHandles()); |
+ X509Certificate* cert = CreateFromHandle(cert_handle, |
+ SOURCE_LONE_CERT_IMPORT, |
+ OSCertHandles()); |
+ FreeOSCertHandle(cert_handle); |
+ return cert; |
} |
void X509Certificate::Persist(Pickle* pickle) { |