diff options
author | Ben Laurie <ben@links.org> | 2016-04-16 05:33:24 +0100 |
---|---|---|
committer | Ben Laurie <ben@links.org> | 2016-04-18 10:21:56 +0100 |
commit | 913954768f4b25b93a89299d03b45611bbdd85b8 (patch) | |
tree | 923e40a73b7e294a8c88b2e0f03cace0d51e331f /crypto/engine | |
parent | 04630522c2d9977896f57b7a5f3c876a61462232 (diff) |
Free engine on error.
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'crypto/engine')
-rw-r--r-- | crypto/engine/eng_cryptodev.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c index 59eab5a744..bdc49ed8a8 100644 --- a/crypto/engine/eng_cryptodev.c +++ b/crypto/engine/eng_cryptodev.c @@ -1671,6 +1671,9 @@ void engine_load_cryptodev_int(void) cryptodev_rsa_nocrt_mod_exp); } } + } else { + ENGINE_free(engine); + return; } #ifndef OPENSSL_NO_DSA @@ -1708,6 +1711,9 @@ void engine_load_cryptodev_int(void) cryptodev_dh_compute_key); } } + } else { + ENGINE_free(engine); + return; } #endif |