From: Tomek Mrugalski Date: Fri, 2 Nov 2012 10:35:55 +0000 (+0100) Subject: [2414] Memory leaks in AllocEngine tests fixed. X-Git-Tag: trac2487_base~1^2~31^2~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9833efc0691e4b80f29a135bfd56fc97e6b0c847;p=thirdparty%2Fkea.git [2414] Memory leaks in AllocEngine tests fixed. --- diff --git a/src/lib/dhcp/tests/alloc_engine_unittest.cc b/src/lib/dhcp/tests/alloc_engine_unittest.cc index bbb4bbd9e9..41cf3206ad 100644 --- a/src/lib/dhcp/tests/alloc_engine_unittest.cc +++ b/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