X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fex_data.c;h=08dc7c40734decef18b7de84b996fd6e6123c5fc;hp=30b16f945728a6c4de1601782987606ac77c7653;hb=af7d8d3446d640018bbeb9879ac585025b949832;hpb=ed6b2c7938ec6f07b15745d4183afc276e74c6dd diff --git a/crypto/ex_data.c b/crypto/ex_data.c index 30b16f9457..08dc7c4073 100644 --- a/crypto/ex_data.c +++ b/crypto/ex_data.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -9,7 +9,6 @@ #include "internal/cryptlib_int.h" #include "internal/thread_once.h" -#include /* * Each structure type (sometimes called a class), that supports @@ -38,8 +37,9 @@ static CRYPTO_ONCE ex_data_init = CRYPTO_ONCE_STATIC_INIT; DEFINE_RUN_ONCE_STATIC(do_ex_data_init) { - OPENSSL_init_crypto(0, NULL); - ex_data_lock = CRYPTO_THREAD_glock_new("ex_data"); + if (!OPENSSL_init_crypto(0, NULL)) + return 0; + ex_data_lock = CRYPTO_THREAD_lock_new(); return ex_data_lock != NULL; }