aboutsummaryrefslogtreecommitdiff
path: root/src/test.cpp
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2015-02-21 17:24:27 +0100
committerLoic Blot <loic.blot@unix-experience.fr>2015-02-21 17:27:31 +0100
commit009149a073ac02dd412af3c203979157976c0dd8 (patch)
treea302fc77ef59b37fde966fb3b155989d9fa3d95b /src/test.cpp
parent5a5854ea9d0bc346b00f48f40b538b7a8d68b37a (diff)
downloadminetest-009149a073ac02dd412af3c203979157976c0dd8.tar.gz
minetest-009149a073ac02dd412af3c203979157976c0dd8.tar.bz2
minetest-009149a073ac02dd412af3c203979157976c0dd8.zip
Fix some memory leaks on packet sending.
Diffstat (limited to 'src/test.cpp')
-rw-r--r--src/test.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test.cpp b/src/test.cpp
index 40943035d..3b7c75c6e 100644
--- a/src/test.cpp
+++ b/src/test.cpp
@@ -2010,6 +2010,8 @@ struct TestConnection: public TestBase
<< std::endl;
UASSERT(memcmp(*sentdata, *recvdata, recvdata.getSize()) == 0);
+
+ delete pkt;
}
u16 peer_id_client = 2;
@@ -2074,6 +2076,8 @@ struct TestConnection: public TestBase
UASSERT(memcmp(*sentdata, *recvdata, recvdata.getSize()) == 0);
UASSERT(peer_id == PEER_ID_SERVER);
+
+ delete pkt;
}
// Check peer handlers