mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-21 11:21:52 +00:00
Merge pull request #1036 from devnexen/netsock_fixleak
unix NET_Socket fix socket leak at address assignment failure.
This commit is contained in:
commit
ac6990c94e
1 changed files with 1 additions and 0 deletions
|
@ -897,6 +897,7 @@ NET_Socket(char *net_interface, int port, netsrc_t type, int family)
|
|||
if (bind(newsocket, ai->ai_addr, ai->ai_addrlen) < 0)
|
||||
{
|
||||
Com_Printf("NET_Socket: bind: %s\n", strerror(errno));
|
||||
close(newsocket);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue