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/evp/evp_enc.c | |
parent | 07b3ce8f8029f647c1babf0d8a03599885e7e284 (diff) | |
download | openssl-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/evp/evp_enc.c')
-rw-r--r-- | crypto/evp/evp_enc.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c index 278e91bada..484b024218 100644 --- a/crypto/evp/evp_enc.c +++ b/crypto/evp/evp_enc.c @@ -79,12 +79,7 @@ int EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *c) } OPENSSL_free(c->cipher_data); #ifndef OPENSSL_NO_ENGINE - if (c->engine) - /* - * The EVP_CIPHER we used belongs to an ENGINE, release the - * functional reference we held for this reason. - */ - ENGINE_finish(c->engine); + ENGINE_finish(c->engine); #endif memset(c, 0, sizeof(*c)); return 1; |