Prevent use after free of global_engine_lock
[oweals/openssl.git] / crypto / engine / eng_lib.c
index 4ba235ca75e18322ca1b08fd3292fd8678ed6aa5..0cdb3fde42d24dccacef6999034622a503bb25fe 100644 (file)
@@ -171,6 +171,7 @@ void engine_cleanup_int(void)
         cleanup_stack = NULL;
     }
     CRYPTO_THREAD_lock_free(global_engine_lock);
+    global_engine_lock = NULL;
 }
 
 /* Now the "ex_data" support */