aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/x509/x509type.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/x509/x509type.c')
-rw-r--r--crypto/x509/x509type.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/crypto/x509/x509type.c b/crypto/x509/x509type.c
index a7695cad77..a9116e7c77 100644
--- a/crypto/x509/x509type.c
+++ b/crypto/x509/x509type.c
@@ -71,7 +71,7 @@ int X509_certificate_type(X509 *x, EVP_PKEY *pkey)
return (0);
if (pkey == NULL)
- pk = X509_get_pubkey(x);
+ pk = X509_get0_pubkey(x);
else
pk = pkey;
@@ -122,7 +122,5 @@ int X509_certificate_type(X509 *x, EVP_PKEY *pkey)
}
}
- if (pkey == NULL)
- EVP_PKEY_free(pk);
return (ret);
}