Skip to content

Fix mem leak found by ASAN

Laurent Montel requested to merge work/fix_mem_leak into master

QTreeViewProxyFilter *proxyModel = new QTreeViewProxyFilter(view); has parent == view but it's nullptr at begin of method

=> KApplicationModel was never deleted

#0 0x7f4b0ede81af in operator new(unsigned long) (/usr/lib64/libasan.so.5+0x10c1af)
#1 0x7f4b0da6a509 in KApplicationModelPrivate::fillNode(QString const&, KDEPrivate::AppNode*) (/source5/kde/kde5.14/lib64/libKF5KIOWidgets.so.5+0xde509)
#2 0x7f4b0da6aaef in KApplicationModel::fetchMore(QModelIndex const&) (/source5/kde/kde5.14/lib64/libKF5KIOWidgets.so.5+0xdeaef)
#3 0x7f4b0da6abb3 in KApplicationModel::fetchAll(QModelIndex const&) (/source5/kde/kde5.14/lib64/libKF5KIOWidgets.so.5+0xdebb3)
#4 0x7f4b0da6a83a in KApplicationModel::KApplicationModel(QObject*) (/source5/kde/kde5.14/lib64/libKF5KIOWidgets.so.5+0xde83a)

Merge request reports

Loading