mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed minor issue.
Socket used to find the broadcast ip was not closed when there was more than 16 broadcast interfaces.
This commit is contained in:
parent
09aa97f712
commit
82873d62c1
@ -78,8 +78,10 @@ static void fetch_broadcast_info(uint16_t port)
|
||||
|
||||
struct sockaddr_in *sock4 = (struct sockaddr_in *)&i_faces[i].ifr_broadaddr;
|
||||
|
||||
if (broadcast_count >= MAX_INTERFACES)
|
||||
if (broadcast_count >= MAX_INTERFACES) {
|
||||
close(sock);
|
||||
return;
|
||||
}
|
||||
|
||||
IP_Port *ip_port = &broadcast_ip_port[broadcast_count];
|
||||
ip_port->ip.family = AF_INET;
|
||||
|
Loading…
x
Reference in New Issue
Block a user