aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPilzAdam <pilzadam@minetest.net>2013-05-14 12:29:30 +0200
committerPilzAdam <pilzadam@minetest.net>2013-05-14 12:29:30 +0200
commitd5ca3b721e049fc4f59718a55c932a06533d4b3c (patch)
tree1b7d167888cd2eec5e4c0029c1878669de1f12ca /src
parent4a95c37e143e37b71a970203707593d26aecccf3 (diff)
downloadminetest-d5ca3b721e049fc4f59718a55c932a06533d4b3c.tar.gz
minetest-d5ca3b721e049fc4f59718a55c932a06533d4b3c.tar.bz2
minetest-d5ca3b721e049fc4f59718a55c932a06533d4b3c.zip
Fix memory leak in run_tests()
Diffstat (limited to 'src')
-rw-r--r--src/test.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test.cpp b/src/test.cpp
index d1f53f880..e1dbfa6b8 100644
--- a/src/test.cpp
+++ b/src/test.cpp
@@ -1772,6 +1772,10 @@ void run_tests()
TEST(TestConnection);
dout_con<<"=== END RUNNING UNIT TESTS FOR CONNECTION ==="<<std::endl;
}
+
+ delete idef;
+ delete ndef;
+
if(tests_failed == 0){
infostream<<"run_tests(): "<<tests_failed<<" / "<<tests_run<<" tests failed."<<std::endl;
infostream<<"run_tests() passed."<<std::endl;
@@ -1781,7 +1785,5 @@ void run_tests()
errorstream<<"run_tests() aborting."<<std::endl;
abort();
}
- delete idef;
- delete ndef;
}