Fix memory leak due to getTestMonitor()
ClosedPublic

Authored by dfaure on May 9 2019, 9:31 AM.

Details

Summary

asan build said the Monitor was leaked, and it was indeed.
Fixed using std::unique_ptr.

Test Plan

cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DECM_ENABLE_SANITIZERS="address" -DCMAKE_CXX_FLAGS='-stdlib=libc++' -DCMAKE_SHARED_LINKER_FLAGS='-stdlib=libc++' -DCMAKE_EXE_LINKER_FLAGS='-stdlib=libc++' .. && make && ctest
(with an asan build of Qt)

Diff Detail

Repository
R165 Akonadi
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
dfaure requested review of this revision.May 9 2019, 9:31 AM
dfaure created this revision.
dvratil accepted this revision.May 9 2019, 10:37 AM
This revision is now accepted and ready to land.May 9 2019, 10:37 AM
This revision was automatically updated to reflect the committed changes.
Restricted Application added a project: KDE PIM. · View Herald TranscriptMay 9 2019, 11:28 AM