From 36028916c4630ea66007760efed8fc6c441e7af5 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Mon, 13 May 2013 13:52:32 +0200 Subject: [PATCH] test_filejournal.cc: cleanup memory in destructor CID 716885 (#1 of 1): Resource leak in object (CTOR_DTOR_LEAK) alloc_new: Allocating memory by calling "new C_SafeCond(&this->lock, &this->cond, &this->done, NULL)". ctor_dtor_leak: The constructor allocates field "c" of "C_Sync" but the destructor and whatever functions it calls do not free it. Signed-off-by: Danny Al-Gaaf --- src/test/test_filejournal.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/test_filejournal.cc b/src/test/test_filejournal.cc index 7365e97dec0..05bd4acb89e 100644 --- a/src/test/test_filejournal.cc +++ b/src/test/test_filejournal.cc @@ -52,6 +52,8 @@ public: cond.Wait(lock); //cout << "waited" << std::endl; lock.Unlock(); + if (c) + delete c; } }; -- 2.47.3