aboutsummaryrefslogtreecommitdiff
path: root/crypto/bio/bio_addr.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/bio/bio_addr.c')
-rw-r--r--crypto/bio/bio_addr.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/crypto/bio/bio_addr.c b/crypto/bio/bio_addr.c
index a80774bbd7ca..04d62f45b198 100644
--- a/crypto/bio/bio_addr.c
+++ b/crypto/bio/bio_addr.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2022 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2016-2024 The OpenSSL Project Authors. All Rights Reserved.
*
* 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
@@ -778,14 +778,12 @@ int BIO_lookup_ex(const char *host, const char *service, int lookup_type,
if (!RUN_ONCE(&bio_lookup_init, do_bio_lookup_init)) {
ERR_raise(ERR_LIB_BIO, ERR_R_MALLOC_FAILURE);
- ret = 0;
- goto err;
+ return 0;
}
- if (!CRYPTO_THREAD_write_lock(bio_lookup_lock)) {
- ret = 0;
- goto err;
- }
+ if (!CRYPTO_THREAD_write_lock(bio_lookup_lock))
+ return 0;
+
he_fallback_address = INADDR_ANY;
if (host == NULL) {
he = &he_fallback;