diff options
author | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2013-05-13 13:52:32 +0200 |
---|---|---|
committer | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2013-05-14 18:39:30 +0200 |
commit | 36028916c4630ea66007760efed8fc6c441e7af5 (patch) | |
tree | 1e83bfc5832b501ff765083dc4a305690435db1a | |
parent | 7ea44ee06eb22eafde4a0bafd8752d4faa541313 (diff) | |
download | ceph-36028916c4630ea66007760efed8fc6c441e7af5.tar.gz |
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 <danny.al-gaaf@bisect.de>
-rw-r--r-- | src/test/test_filejournal.cc | 2 |
1 files changed, 2 insertions, 0 deletions
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; } }; |