Index: net/ssl/client_cert_store_win.cc |
diff --git a/net/ssl/client_cert_store_win.cc b/net/ssl/client_cert_store_win.cc |
index 499d1c4b55ecb8cca0ff0a90a3130b5e78a5ec43..cdeee46c12ca889a2c0dfb062fd1471c51b5a0a8 100644 |
--- a/net/ssl/client_cert_store_win.cc |
+++ b/net/ssl/client_cert_store_win.cc |
@@ -149,7 +149,8 @@ void GetClientCertsImpl(HCERTSTORE cert_store, |
// pair<X509Certificate, SSLPrivateKeyCallback>. |
scoped_refptr<X509Certificate> cert = X509Certificate::CreateFromHandle( |
cert_context2, intermediates); |
- selected_certs->push_back(cert); |
+ if (cert) |
+ selected_certs->push_back(std::move(cert)); |
CertFreeCertificateContext(cert_context2); |
for (size_t i = 0; i < intermediates.size(); ++i) |
CertFreeCertificateContext(intermediates[i]); |