Browse Source

[2414] Memory leaks in AllocEngine tests fixed.

Tomek Mrugalski 12 years ago
parent
commit
9833efc069
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/lib/dhcp/tests/alloc_engine_unittest.cc

+ 8 - 0
src/lib/dhcp/tests/alloc_engine_unittest.cc

@@ -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