Merge pull request #59 from universal963/patch-3

Fix possible memory leaks in `network.cpp`
This commit is contained in:
Detanup01 2024-10-18 16:06:21 +02:00 committed by GitHub
commit 2f81f755b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -110,7 +110,7 @@ static void get_broadcast_info(uint16 port)
number_broadcasts++;
if (number_broadcasts >= MAX_BROADCASTS) {
return;
break;
}
}
@ -542,6 +542,8 @@ std::set<IP_PORT> Networking::resolve_ip(std::string dns)
}
}
if (result)
freeaddrinfo(result);
return ips;
}