Memory leak in ldk/sar/tests/FixedTest.cpp

Bug #325097 reported by Daniel Bültmann
2
Affects Status Importance Assigned to Milestone
openWNS Library
New
Undecided
Unassigned

Bug Description

In the setUp() method the member commandPool is allocated via createCommandPool() but is not deleted.

Details can be found here:

http://buildbot.openwns.org/builders/x86%20ubuntu_hardy%20memcheck

For example:

==14283== 1,516 (448 direct, 1,068 indirect) bytes in 7 blocks are definitely lost in loss record 241 of 278
==14283== at 0x4023294: operator new(unsigned) (vg_replace_malloc.c:224)
==14283== by 0x4C19D92: wns::ldk::CommandProxy::createCommandPool(wns::ldk::fun::FUN const*) const (CommandProxy.cpp:257)
==14283== by 0x4D0DE3A: wns::ldk::fun::FUN::createCommandPool() (FUN.hpp:197)
==14283== by 0x4F388A5: wns::ldk::sar::tests::FixedTest::prepare() (FixedTest.cpp:140)
==14283== by 0x477104D: wns::TestFixture::setUp() (TestFixture.cpp:41)
==14283== by 0x4EDD801: CppUnit::TestCaller<wns::ldk::tests::DelayedInterfaceTest>::setUp() (TestCaller.h:177)
==14283== by 0x52E4DA6: CppUnit::TestCaseMethodFunctor::operator()() const (in /usr/lib/libcppunit-1.12.so.0.0.0)
==14283== by 0x52D7109: CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (in /usr/lib/libcppunit-1.12.so.0.0.0)
==14283== by 0x52E0942: CppUnit::ProtectorChain::ProtectFunctor::operator()() const (in /usr/lib/libcppunit-1.12.so.0.0.0)
==14283== by 0x52E0643: CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (in /usr/lib/libcppunit-1.12.so.0.0.0)
==14283== by 0x52ECF62: CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::string const&) (in /usr/lib/libcppunit-1.12.so.0.0.0)
==14283== by 0x52E49F9: CppUnit::TestCase::run(CppUnit::TestResult*) (in /usr/lib/libcppunit-1.12.so.0.0.0)
==14283== by 0x52E542E: CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) (in /usr/lib/libcppunit-1.12.so.0.0.0)
==14283== by 0x52E5369: CppUnit::TestComposite::run(CppUnit::TestResult*) (in /usr/lib/libcppunit-1.12.so.0.0.0)
==14283== by 0x52E542E: CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) (in /usr/lib/libcppunit-1.12.so.0.0.0)
==14283== by 0x52E5369: CppUnit::TestComposite::run(CppUnit::TestResult*) (in /usr/lib/libcppunit-1.12.so.0.0.0)
==14283== by 0x52E542E: CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) (in /usr/lib/libcppunit-1.12.so.0.0.0)
==14283== by 0x52E5369: CppUnit::TestComposite::run(CppUnit::TestResult*) (in /usr/lib/libcppunit-1.12.so.0.0.0)
==14283== by 0x52ECCD9: CppUnit::TestResult::runTest(CppUnit::Test*) (in /usr/lib/libcppunit-1.12.so.0.0.0)
==14283== by 0x52EF26F: CppUnit::TestRunner::run(CppUnit::TestResult&, std::string const&) (in /usr/lib/libcppunit-1.12.so.0.0.0)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.