Prevent use after free of global_engine_lock
[openssl.git] / crypto / engine / eng_lib.c
index 4ba235c..0cdb3fd 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 */