mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2025-12-29 16:00:12 +01:00
fix socket descriptor leak in _dbus_connect_tcp_socket_with_nonce
This commit is contained in:
parent
2313832d38
commit
77ee59e06d
1 changed files with 4 additions and 0 deletions
|
|
@ -1294,6 +1294,7 @@ _dbus_connect_tcp_socket_with_nonce (const char *host,
|
|||
dbus_set_error (error,
|
||||
_dbus_error_from_errno (errno),
|
||||
"Unknown address family %s", family);
|
||||
closesocket (fd);
|
||||
return -1;
|
||||
}
|
||||
hints.ai_protocol = IPPROTO_TCP;
|
||||
|
|
@ -1314,6 +1315,9 @@ _dbus_connect_tcp_socket_with_nonce (const char *host,
|
|||
return -1;
|
||||
}
|
||||
|
||||
closesocket (fd);
|
||||
fd = -1;
|
||||
|
||||
tmp = ai;
|
||||
while (tmp)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue