summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-11-25 16:00:04 +0000
committerrubidium <rubidium@openttd.org>2010-11-25 16:00:04 +0000
commit374fc308de4d6413ed2bdb53c39908ceb7e393e3 (patch)
tree445ff2155eae012bd91ec747978c677efbdd82f7 /src/network
parent02d63f45e2cfdbb1321538c37499deefa9eae23a (diff)
downloadopenttd-374fc308de4d6413ed2bdb53c39908ceb7e393e3.tar.xz
(svn r21322) -Fix [FS#4268] (r20924): packets were leaked
Diffstat (limited to 'src/network')
-rw-r--r--src/network/core/tcp_game.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/network/core/tcp_game.cpp b/src/network/core/tcp_game.cpp
index 3cf1a468b..258f9c6b2 100644
--- a/src/network/core/tcp_game.cpp
+++ b/src/network/core/tcp_game.cpp
@@ -141,6 +141,7 @@ NetworkRecvStatus NetworkGameSocketHandler::Recv_Packets()
Packet *p;
while ((p = this->Recv_Packet()) != NULL) {
NetworkRecvStatus res = HandlePacket(p);
+ delete p;
if (res != NETWORK_RECV_STATUS_OKAY) return res;
}