]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/ec/ec_kmeth.c
GH715: ENGINE_finish can take NULL
[thirdparty/openssl.git] / crypto / ec / ec_kmeth.c
index 51992aff433b504cb9db3e6bb20c30093ff1744d..1a15877461a9157568b1f41c44ffa92e9362112b 100644 (file)
@@ -105,10 +105,8 @@ int EC_KEY_set_method(EC_KEY *key, const EC_KEY_METHOD *meth)
         finish(key);
 
 #ifndef OPENSSL_NO_ENGINE
-    if (key->engine != NULL) {
-        ENGINE_finish(key->engine);
-        key->engine = NULL;
-    }
+    ENGINE_finish(key->engine);
+    key->engine = NULL;
 #endif
 
     key->meth = meth;