GH715: ENGINE_finish can take NULL
[oweals/openssl.git] / crypto / engine / eng_init.c
index b66d476d803d4ebd9bd92b86c5da7dfe699d61a6..ddf552a5370decc5c2d6df0d38ce1f56c4d72a3f 100644 (file)
@@ -136,10 +136,8 @@ int ENGINE_finish(ENGINE *e)
 {
     int to_return = 1;
 
-    if (e == NULL) {
-        ENGINEerr(ENGINE_F_ENGINE_FINISH, ERR_R_PASSED_NULL_PARAMETER);
-        return 0;
-    }
+    if (e == NULL)
+        return 1;
     CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
     to_return = engine_unlocked_finish(e, 1);
     CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);