Merge pull request #1036 from devnexen/netsock_fixleak

unix NET_Socket fix socket leak at address assignment failure.
This commit is contained in:
Yamagi 2023-07-30 17:23:57 +02:00 committed by GitHub
commit ac6990c94e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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
{