From 54ce1b5c0640cdf668ed48699153f028fc42d1c2 Mon Sep 17 00:00:00 2001 From: Dino Bollinger Date: Fri, 12 Jun 2020 13:17:51 +0200 Subject: [PATCH] Fix minor memory leak in Net_Connect() # Conflicts: # source/duke3d/src/network.cpp --- source/duke3d/src/network.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/duke3d/src/network.cpp b/source/duke3d/src/network.cpp index 4fc348318..6a1342237 100644 --- a/source/duke3d/src/network.cpp +++ b/source/duke3d/src/network.cpp @@ -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; }