From: Danny Al-Gaaf Date: Mon, 13 May 2013 11:52:32 +0000 (+0200) Subject: test_filejournal.cc: cleanup memory in destructor X-Git-Tag: v0.63~29^2~15 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=36028916c4630ea66007760efed8fc6c441e7af5;p=ceph.git 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 --- diff --git a/src/test/test_filejournal.cc b/src/test/test_filejournal.cc index 7365e97dec0a..05bd4acb89ec 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; } };