In openssl-3.0.0 and system provided, it is not reasonable to
check null pointer after use. The order was accidentally reversed.
Therefore, it is better to correct it.
CLA: trivial
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16915)
BIO_snprintf(addr_str, sizeof(addr_str), ":%s", BIO_get_accept_port(acpt));
client = BIO_new_connect(addr_str);
- BIO_set_conn_ip_family(client, family);
if (!client)
goto err;
+ BIO_set_conn_ip_family(client, family);
if (BIO_set_nbio(client, 1) <= 0)
goto err;