summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorglx22 <glx22@users.noreply.github.com>2020-05-07 02:00:53 +0200
committerGitHub <noreply@github.com>2020-05-07 02:00:53 +0200
commit82573a5e73da49e90c334001dfd4dd259dec7b15 (patch)
treea21b72943d072c171bcc42d7783ff9b2767b5278 /src
parent86e9326b7f9a0f74e5e8b271289685a1d5deeaf2 (diff)
downloadopenttd-82573a5e73da49e90c334001dfd4dd259dec7b15.tar.xz
Fix #8117: Memory leak in admin port (#8122)
Diffstat (limited to 'src')
-rw-r--r--src/network/core/tcp_admin.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/network/core/tcp_admin.cpp b/src/network/core/tcp_admin.cpp
index fdeb3d829..98227e019 100644
--- a/src/network/core/tcp_admin.cpp
+++ b/src/network/core/tcp_admin.cpp
@@ -115,6 +115,7 @@ NetworkRecvStatus NetworkAdminSocketHandler::ReceivePackets()
Packet *p;
while ((p = this->ReceivePacket()) != nullptr) {
NetworkRecvStatus res = this->HandlePacket(p);
+ delete p;
if (res != NETWORK_RECV_STATUS_OKAY) return res;
}