diff options
author | Rich Salz <rsalz@akamai.com> | 2016-02-25 12:09:06 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-02-25 15:19:42 -0500 |
commit | 7c96dbcdab959fef74c4caae63cdebaa354ab252 (patch) | |
tree | af59789bb5bc85efd7e700d657db004910f8ba64 /crypto/asn1 | |
parent | 07b3ce8f8029f647c1babf0d8a03599885e7e284 (diff) |
GH715: ENGINE_finish can take NULL
Simplifies calling code. Also fixed up any !ptr tests that were
nearby, turning them into NULL tests.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/asn1')
-rw-r--r-- | crypto/asn1/d2i_pr.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crypto/asn1/d2i_pr.c b/crypto/asn1/d2i_pr.c index bfbe2096ca..e405b83dc8 100644 --- a/crypto/asn1/d2i_pr.c +++ b/crypto/asn1/d2i_pr.c @@ -82,10 +82,8 @@ EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp, } else { ret = *a; #ifndef OPENSSL_NO_ENGINE - if (ret->engine) { - ENGINE_finish(ret->engine); - ret->engine = NULL; - } + ENGINE_finish(ret->engine); + ret->engine = NULL; #endif } |