aboutsummaryrefslogtreecommitdiff
path: root/crypto/asn1/d2i_pr.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/d2i_pr.c
parent33b188a8e82df57208ec8263c263f8b6f47e8255 (diff)
downloadopenssl-c5ba2d990420e1778ca4a90bf882e0f806404af0.zip
openssl-c5ba2d990420e1778ca4a90bf882e0f806404af0.tar.gz
openssl-c5ba2d990420e1778ca4a90bf882e0f806404af0.tar.bz2
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/d2i_pr.c')
-rw-r--r--crypto/asn1/d2i_pr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/asn1/d2i_pr.c b/crypto/asn1/d2i_pr.c
index 5f1a96d..793532f 100644
--- a/crypto/asn1/d2i_pr.c
+++ b/crypto/asn1/d2i_pr.c
@@ -113,7 +113,7 @@ EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp,
(*a) = ret;
return (ret);
err:
- if ((ret != NULL) && ((a == NULL) || (*a != ret)))
+ if (a == NULL || *a != ret)
EVP_PKEY_free(ret);
return (NULL);
}