set engine to NULL after releasing it
authorDr. Stephen Henson <steve@openssl.org>
Thu, 12 Nov 2009 19:25:37 +0000 (19:25 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 12 Nov 2009 19:25:37 +0000 (19:25 +0000)
crypto/evp/p_lib.c

index 249ac2b..1916c61 100644 (file)
@@ -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)