Fix minor memory leak in Net_Connect()

# Conflicts:
#	source/duke3d/src/network.cpp
This commit is contained in:
Dino Bollinger 2020-06-12 13:17:51 +02:00 committed by Christoph Oelckers
parent 4128fd62c7
commit 54ce1b5c06

View file

@ -4689,6 +4689,7 @@ void Net_Connect(const char *srvaddr)
if (g_netClient == NULL)
{
Printf("An error occurred while trying to create an ENet client host.\n");
Xfree(oursrvaddr);
return;
}
@ -4702,6 +4703,7 @@ void Net_Connect(const char *srvaddr)
if (g_netClientPeer == NULL)
{
Printf("No available peers for initiating an ENet connection.\n");
Xfree(oursrvaddr);
return;
}