diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-07-16 10:43:07 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-07-16 10:43:07 +0000 |
commit | a70e267e686cb37745b075436a2d8fe267e53233 (patch) | |
tree | 5f76b4c65f23c44fc21eb561754f71923c6096ad /lib | |
parent | e708866e5e7e02c756cd6102072d6ccb4ed65c43 (diff) |
do not need a variable to track locking, since all code paths have it
locked throughout.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libssl/src/crypto/bio/b_sock.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/libssl/src/crypto/bio/b_sock.c b/lib/libssl/src/crypto/bio/b_sock.c index ced0406bc15..c095943e8b9 100644 --- a/lib/libssl/src/crypto/bio/b_sock.c +++ b/lib/libssl/src/crypto/bio/b_sock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: b_sock.c,v 1.55 2014/07/13 16:03:09 beck Exp $ */ +/* $OpenBSD: b_sock.c,v 1.56 2014/07/16 10:43:06 deraadt Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -80,7 +80,6 @@ BIO_get_host_ip(const char *str, unsigned char *ip) { int i; int err = 1; - int locked = 0; struct hostent *he; if (inet_pton(AF_INET, str, ip) == 1) @@ -88,7 +87,6 @@ BIO_get_host_ip(const char *str, unsigned char *ip) /* do a gethostbyname */ CRYPTO_w_lock(CRYPTO_LOCK_GETHOSTBYNAME); - locked = 1; he = BIO_gethostbyname(str); if (he == NULL) { BIOerr(BIO_F_BIO_GET_HOST_IP, BIO_R_BAD_HOSTNAME_LOOKUP); @@ -106,8 +104,7 @@ BIO_get_host_ip(const char *str, unsigned char *ip) err = 0; err: - if (locked) - CRYPTO_w_unlock(CRYPTO_LOCK_GETHOSTBYNAME); + CRYPTO_w_unlock(CRYPTO_LOCK_GETHOSTBYNAME); if (err) { ERR_asprintf_error_data("host=%s", str); return 0; |