From 913954768f4b25b93a89299d03b45611bbdd85b8 Mon Sep 17 00:00:00 2001 From: Ben Laurie Date: Sat, 16 Apr 2016 05:33:24 +0100 Subject: [PATCH] Free engine on error. Reviewed-by: Matt Caswell --- crypto/engine/eng_cryptodev.c | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 2.25.1