Fix mem leak found with asan
ClosedPublic

Authored by mlaurent on Nov 21 2018, 7:05 AM.

Details

Summary
Fix mem when I used dolphin

#0 0x7fa8cd24d900 in operator new(unsigned long) (/usr/lib64/libasan.so.5+0xed900)
#1 0x7fa8cbc89052 in KFilePlacesModel::Private::Private(KFilePlacesModel*) /compile/kde5/framework/frameworks/kio/src/filewidgets/kfileplacesmodel.cpp:172
#2 0x7fa8cbc81703 in KFilePlacesModel::KFilePlacesModel(QString const&, QObject*) /compile/kde5/framework/frameworks/kio/src/filewidgets/kfileplacesmodel.cpp:257
#3 0x7fa8ccf83a14 in DolphinPlacesModelSingleton::DolphinPlacesModelSingleton() /compile/kde5/framework/kde/applications/dolphin/src/dolphinplacesmodelsingleton.cpp:26
#4 0x7fa8ccf83b9c in DolphinPlacesModelSingleton::instance() /compile/kde5/framework/kde/applications/dolphin/src/dolphinplacesmodelsingleton.cpp:33
Test Plan
Relaunch dolphin with fix + asan => no problem

Diff Detail

Repository
R241 KIO
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mlaurent created this revision.Nov 21 2018, 7:05 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptNov 21 2018, 7:05 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
mlaurent requested review of this revision.Nov 21 2018, 7:05 AM
dfaure accepted this revision.Nov 21 2018, 9:33 AM

Cool, that debugging and profiling training I gave you last week is already paying off :-)

This revision is now accepted and ready to land.Nov 21 2018, 9:33 AM

Indeed a very good training "debugging and profiling"

I fixed some potential other mem leak in kinfocenter/ark/libksysguard yesterday.
Very useful indeed.

This revision was automatically updated to reflect the committed changes.