unix NET_Socket fix socket leak at address assignment failure.

This commit is contained in:
David Carlier 2023-07-29 06:55:22 +01:00
parent 030af432f7
commit efc59a3e3d
1 changed files with 1 additions and 0 deletions

View File

@ -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
{