aboutsummaryrefslogtreecommitdiff
path: root/crypto/ex_data.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-03-11 21:53:18 +0000
committerMatt Caswell <matt@openssl.org>2016-04-14 13:19:04 +0100
commitff2344052bfa0132260ee3154962a2552f3d95f5 (patch)
tree4ab28127a480a46064e730088339e4fe6dbd7cfc /crypto/ex_data.c
parent085b3860651e2ff55e28f8a28a1f66b1a3fe538f (diff)
downloadopenssl-ff2344052bfa0132260ee3154962a2552f3d95f5.zip
openssl-ff2344052bfa0132260ee3154962a2552f3d95f5.tar.gz
openssl-ff2344052bfa0132260ee3154962a2552f3d95f5.tar.bz2
Ensure all locks are properly cleaned up
Some locks were not being properly cleaned up during close down. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/ex_data.c')
-rw-r--r--crypto/ex_data.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/crypto/ex_data.c b/crypto/ex_data.c
index 44dc46b..c607f87 100644
--- a/crypto/ex_data.c
+++ b/crypto/ex_data.c
@@ -108,7 +108,7 @@
*
*/
-#include "internal/cryptlib.h"
+#include "internal/cryptlib_int.h"
#include "internal/threads.h"
#include <openssl/lhash.h>
@@ -139,9 +139,13 @@ static CRYPTO_ONCE ex_data_init = CRYPTO_ONCE_STATIC_INIT;
static void do_ex_data_init(void)
{
- CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
ex_data_lock = CRYPTO_THREAD_lock_new();
- CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE);
+}
+
+void ex_data_cleanup(void)
+{
+ CRYPTO_THREAD_lock_free(ex_data_lock);
+ ex_data_lock = NULL;
}
/*