From 773b63d6f9e20cbd90ead64d276068527eea4b24 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Thu, 12 Nov 2009 19:25:37 +0000 Subject: [PATCH] set engine to NULL after releasing it --- crypto/evp/p_lib.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c index 249ac2bd2a..1916c61699 100644 --- a/crypto/evp/p_lib.c +++ b/crypto/evp/p_lib.c @@ -220,7 +220,10 @@ static int pkey_set_type(EVP_PKEY *pkey, int type, const char *str, int len) #ifndef OPENSSL_NO_ENGINE /* If we have an ENGINE release it */ if (pkey->engine) + { ENGINE_finish(pkey->engine); + pkey->engine = NULL; + } #endif } if (str) -- 2.34.1