diff options
Diffstat (limited to 'crypto/engine/engine_all.c')
-rw-r--r-- | crypto/engine/engine_all.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/engine/engine_all.c b/crypto/engine/engine_all.c index 43da60483b..4d0244f351 100644 --- a/crypto/engine/engine_all.c +++ b/crypto/engine/engine_all.c @@ -62,12 +62,14 @@ static int engine_add(ENGINE *e) { + int toret = 1; if (!ENGINE_by_id(ENGINE_get_id(e))) { (void)ERR_get_error(); - return ENGINE_add(e); + toret = ENGINE_add(e); } - return 1; + ENGINE_free(e); + return toret; } void ENGINE_load_cswift(void) |