Commit d279acc6 authored by Dino Bollinger's avatar Dino Bollinger Committed by Richard Gobeille

Fix minor memory leak in Net_Connect()

parent 6ec133c9
......@@ -4692,6 +4692,7 @@ void Net_Connect(const char *srvaddr)
if (g_netClient == NULL)
{
initprintf("An error occurred while trying to create an ENet client host.\n");
Xfree(oursrvaddr);
return;
}
......@@ -4705,6 +4706,7 @@ void Net_Connect(const char *srvaddr)
if (g_netClientPeer == NULL)
{
initprintf("No available peers for initiating an ENet connection.\n");
Xfree(oursrvaddr);
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment