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:
irungentoo 2014-04-26 12:30:29 -04:00
parent 09aa97f712
commit 82873d62c1
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98

View File

@ -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;