Add some missing cleanup calls to de-init
authorMatt Caswell <matt@openssl.org>
Mon, 14 Mar 2016 10:26:28 +0000 (10:26 +0000)
committerMatt Caswell <matt@openssl.org>
Mon, 14 Mar 2016 10:54:37 +0000 (10:54 +0000)
OBJ_cleanup() doesn't always get called from EVP_cleanup() so needs to be
explicitly called in de-init. Also BIO_sock_cleanup() also needs to be
called.

Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/init.c

index d50d7f19e8eb312746a24e72f3771d2c18a2d491..dc15b1d83a7e4f61413ee0f039947d629fcd834c 100644 (file)
@@ -483,7 +483,9 @@ void OPENSSL_cleanup(void)
     ENGINE_cleanup();
 #endif
     CRYPTO_cleanup_all_ex_data();
+    BIO_sock_cleanup();
     EVP_cleanup();
+    OBJ_cleanup();
     CONF_modules_free();
     RAND_cleanup();
     base_inited = 0;