From edd5b9d708d03ce1bdc1cbfc026ccc9183d586ad Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Wed, 7 Jun 2023 16:26:58 +0100 Subject: Fix minor issues in the demo/man pages for TLS client/blocking Reviewed-by: Viktor Dukhovni Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/21133) --- demos/guide/tls-client-block.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'demos') diff --git a/demos/guide/tls-client-block.c b/demos/guide/tls-client-block.c index 56133aa..ef8248c 100644 --- a/demos/guide/tls-client-block.c +++ b/demos/guide/tls-client-block.c @@ -37,10 +37,8 @@ static BIO *create_socket_bio(const char *hostname, const char *port) * Lookup IP address info for the server. */ if (!BIO_lookup_ex(hostname, port, BIO_LOOKUP_CLIENT, 0, SOCK_STREAM, 0, - &res)) { - BIO_closesocket(sock); + &res)) return NULL; - } /* * Loop through all the possible addresses for the server and find one -- cgit v1.1