X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fex_data.c;h=33f43bf2e71aff59cf419b28a94992b09cb545a5;hp=22c4d3d9b904d73c5db4117faf59467e272de597;hb=fb82cbfe3da846d61e1d4c6d14bf7f4111cccbb2;hpb=1ee2125922d3302e3ea738442bf2b051a445cac0 diff --git a/crypto/ex_data.c b/crypto/ex_data.c index 22c4d3d9b9..33f43bf2e7 100644 --- a/crypto/ex_data.c +++ b/crypto/ex_data.c @@ -1,7 +1,7 @@ /* - * 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 + * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html @@ -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,7 +37,8 @@ static CRYPTO_ONCE ex_data_init = CRYPTO_ONCE_STATIC_INIT; DEFINE_RUN_ONCE_STATIC(do_ex_data_init) { - OPENSSL_init_crypto(0, NULL); + if (!OPENSSL_init_crypto(0, NULL)) + return 0; ex_data_lock = CRYPTO_THREAD_lock_new(); return ex_data_lock != NULL; }