aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/asn1/x_pkey.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-03-28 10:54:15 -0400
committerRich Salz <rsalz@openssl.org>2015-03-28 10:54:15 -0400
commitc5ba2d990420e1778ca4a90bf882e0f806404af0 (patch)
tree61641d19bea624b7fa523162f0ebb0d5e2fccf55 /crypto/asn1/x_pkey.c
parent33b188a8e82df57208ec8263c263f8b6f47e8255 (diff)
downloadopenssl-c5ba2d990420e1778ca4a90bf882e0f806404af0.tar.gz
free NULL cleanup
EVP_.*free; this gets: EVP_CIPHER_CTX_free EVP_PKEY_CTX_free EVP_PKEY_asn1_free EVP_PKEY_asn1_set_free EVP_PKEY_free EVP_PKEY_free_it EVP_PKEY_meth_free; and also EVP_CIPHER_CTX_cleanup Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Diffstat (limited to 'crypto/asn1/x_pkey.c')
-rw-r--r--crypto/asn1/x_pkey.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/asn1/x_pkey.c b/crypto/asn1/x_pkey.c
index f4396e7d17..f24c0ce914 100644
--- a/crypto/asn1/x_pkey.c
+++ b/crypto/asn1/x_pkey.c
@@ -144,8 +144,7 @@ void X509_PKEY_free(X509_PKEY *x)
if (x->enc_algor != NULL)
X509_ALGOR_free(x->enc_algor);
ASN1_OCTET_STRING_free(x->enc_pkey);
- if (x->dec_pkey != NULL)
- EVP_PKEY_free(x->dec_pkey);
+ EVP_PKEY_free(x->dec_pkey);
if ((x->key_data != NULL) && (x->key_free))
OPENSSL_free(x->key_data);
OPENSSL_free(x);