mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2025-04-21 21:52:06 +02:00
Merge pull request #59 from universal963/patch-3
Fix possible memory leaks in `network.cpp`
This commit is contained in:
commit
2f81f755b7
1 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue