mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-11-27 05:04:01 +08:00
Merge pull request #59 from universal963/patch-3
Fix possible memory leaks in `network.cpp`
This commit is contained in:
commit
2f81f755b7
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user