Commit eef349be authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix mem leak found by asan

parent 6a6a72db
Pipeline #24694 passed with stage
in 12 minutes and 12 seconds
......@@ -49,6 +49,7 @@ void MBoxBenchmark::initTestCase()
void MBoxBenchmark::cleanupTestCase()
{
mTempDir->remove();
delete mTempDir;
}
void MBoxBenchmark::testNoLockPerformance()
......@@ -70,7 +71,8 @@ void MBoxBenchmark::testNoLockPerformance()
mbox2.load(fileName());
const auto lst = mbox2.entries();
for (const MBoxEntry &entry : lst) {
mbox2.readMessage(entry);
auto mail = mbox2.readMessage(entry);
delete mail;
}
}
}
......@@ -98,7 +100,8 @@ void MBoxBenchmark::testProcfileLockPerformance()
const auto lst = mbox2.entries();
for (const MBoxEntry &entry : lst) {
mbox2.readMessage(entry);
auto mail = mbox2.readMessage(entry);
delete mail;
}
}
}
......
......@@ -502,6 +502,7 @@ void MboxTest::testReadOnlyMbox()
void MboxTest::cleanupTestCase()
{
mTempDir->remove();
delete mTempDir;
}
//---------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment