summaryrefslogtreecommitdiffstats
path: root/crypto/bio/b_addr.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2016-08-19 21:04:41 -0400
committerRich Salz <rsalz@openssl.org>2016-08-19 21:04:41 -0400
commit8b8d963db5bb619fbada014f294fd09a855a2650 (patch)
treea330e959245ca6216ea42978799134be17be239f /crypto/bio/b_addr.c
parent9e313563da23f3dc0a6db557f708726234e3f653 (diff)
Add BIO_get_new_index()
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
Diffstat (limited to 'crypto/bio/b_addr.c')
-rw-r--r--crypto/bio/b_addr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/bio/b_addr.c b/crypto/bio/b_addr.c
index 4e8785fdcd..17ab3e4e83 100644
--- a/crypto/bio/b_addr.c
+++ b/crypto/bio/b_addr.c
@@ -19,6 +19,7 @@
#include <ctype.h>
CRYPTO_RWLOCK *bio_lookup_lock;
+extern CRYPTO_RWLOCK *bio_type_lock;
static CRYPTO_ONCE bio_lookup_init = CRYPTO_ONCE_STATIC_INIT;
/*
@@ -605,7 +606,8 @@ static int addrinfo_wrap(int family, int socktype,
DEFINE_RUN_ONCE_STATIC(do_bio_lookup_init)
{
bio_lookup_lock = CRYPTO_THREAD_lock_new();
- return (bio_lookup_lock != NULL);
+ bio_type_lock = CRYPTO_THREAD_lock_new();
+ return bio_lookup_lock != NULL && bio_type_lock != NULL;
}
/*-