Index: crypto/rsa_private_key_openssl.cc |
diff --git a/crypto/rsa_private_key_openssl.cc b/crypto/rsa_private_key_openssl.cc |
index 9f8352d921582c06bfa94558147a911ac2d63f4a..52a0a7a1815e820f69a54d953168f93b7bdd2ea4 100644 |
--- a/crypto/rsa_private_key_openssl.cc |
+++ b/crypto/rsa_private_key_openssl.cc |
@@ -103,7 +103,7 @@ RSAPrivateKey* RSAPrivateKey::CreateFromKey(EVP_PKEY* key) { |
if (EVP_PKEY_type(key->type) != EVP_PKEY_RSA) |
return NULL; |
RSAPrivateKey* copy = new RSAPrivateKey(); |
- copy->key_ = EVP_PKEY_dup(key); |
+ copy->key_ = EVP_PKEY_up_ref(key); |
return copy; |
} |