summaryrefslogtreecommitdiffstats
path: root/crypto/pem/pem_pk8.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/pem/pem_pk8.c')
-rw-r--r--crypto/pem/pem_pk8.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/pem/pem_pk8.c b/crypto/pem/pem_pk8.c
index 0d76026155..529d077a9a 100644
--- a/crypto/pem/pem_pk8.c
+++ b/crypto/pem/pem_pk8.c
@@ -183,8 +183,7 @@ EVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb,
if (!ret)
return NULL;
if (x) {
- if (*x)
- EVP_PKEY_free(*x);
+ EVP_PKEY_free(*x);
*x = ret;
}
return ret;