]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2414] Memory leaks in AllocEngine tests fixed.
authorTomek Mrugalski <tomasz@isc.org>
Fri, 2 Nov 2012 10:35:55 +0000 (11:35 +0100)
committerTomek Mrugalski <tomasz@isc.org>
Fri, 2 Nov 2012 10:35:55 +0000 (11:35 +0100)
src/lib/dhcp/tests/alloc_engine_unittest.cc

index bbb4bbd9e99a5ee937594650b8fa5a9d15409c24..41cf3206ad393b77c08dc9c4208deea294f7ef39 100644 (file)
@@ -151,6 +151,8 @@ TEST_F(AllocEngineTest, simpleAlloc) {
 
     // Now check that the lease in LeaseMgr has the same parameters
     detailCompareLease6(lease, from_mgr);
+
+    delete engine;
 }
 
 // This test checks if the fake allocation (for SOLICIT) can succeed
@@ -201,6 +203,8 @@ TEST_F(AllocEngineTest, allocWithValidHint) {
 
     // Now check that the lease in LeaseMgr has the same parameters
     detailCompareLease6(lease, from_mgr);
+
+    delete engine;
 }
 
 // This test checks if the allocation with a hint that is in range,
@@ -241,6 +245,8 @@ TEST_F(AllocEngineTest, allocWithUsedHint) {
 
     // Now check that the lease in LeaseMgr has the same parameters
     detailCompareLease6(lease, from_mgr);
+
+    delete engine;
 }
 
 // This test checks if the allocation with a hint that is out the blue
@@ -272,6 +278,8 @@ TEST_F(AllocEngineTest, allocBogusHint) {
 
     // Now check that the lease in LeaseMgr has the same parameters
     detailCompareLease6(lease, from_mgr);
+
+    delete engine;
 }
 
 // This test verifies that the allocator picks addresses that belong to the