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/ec/ec_key.c | |
parent | 07b3ce8f8029f647c1babf0d8a03599885e7e284 (diff) | |
download | openssl-new-7c96dbcdab959fef74c4caae63cdebaa354ab252.tar.gz |
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/ec/ec_key.c')
-rw-r--r-- | crypto/ec/ec_key.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/ec/ec_key.c b/crypto/ec/ec_key.c index 7d8507ca50..c382e7e41e 100644 --- a/crypto/ec/ec_key.c +++ b/crypto/ec/ec_key.c @@ -108,8 +108,7 @@ void EC_KEY_free(EC_KEY *r) r->meth->finish(r); #ifndef OPENSSL_NO_ENGINE - if (r->engine != NULL) - ENGINE_finish(r->engine); + ENGINE_finish(r->engine); #endif CRYPTO_free_ex_data(CRYPTO_EX_INDEX_EC_KEY, r, &r->ex_data); @@ -130,7 +129,7 @@ EC_KEY *EC_KEY_copy(EC_KEY *dest, EC_KEY *src) if (dest->meth->finish != NULL) dest->meth->finish(dest); #ifndef OPENSSL_NO_ENGINE - if (dest->engine != NULL && ENGINE_finish(dest->engine) == 0) + if (ENGINE_finish(dest->engine) == 0) return 0; dest->engine = NULL; #endif |