2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

Merge branch '3574-cid-357292-improper-use-of-negative-value-in-tcp.c' into 'main'

Resolve "CID 357292: Improper use of negative value in lib/isc/netmgr/tcp.c"

Closes #3574

See merge request isc-projects/bind9!6851
This commit is contained in:
Arаm Sаrgsyаn 2022-10-12 09:00:21 +00:00
commit 981d6ef1c0

View File

@ -306,9 +306,7 @@ isc_nm_tcpconnect(isc_nm_t *mgr, isc_sockaddr_t *local, isc_sockaddr_t *peer,
result = tcp_connect_direct(sock, req);
if (result != ISC_R_SUCCESS) {
atomic_store(&sock->active, false);
if (sock->fd != (uv_os_sock_t)(-1)) {
isc__nm_tcp_close(sock);
}
isc__nm_tcp_close(sock);
isc__nm_connectcb(sock, req, result, true);
}