mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-21 03:11:57 +00:00
unix NET_Socket fix socket leak at address assignment failure.
This commit is contained in:
parent
030af432f7
commit
efc59a3e3d
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