[vlc-devel] [PATCH] qt: mlfoldersmodel: fix memory leak
Alexandre Janniaux
ajanni at videolabs.io
Wed Apr 15 16:04:20 CEST 2020
The vlc_ml_entry_point_list_t must be released, which will release the
psz_mrl of each entrypoint at the same time.
---
modules/gui/qt/medialibrary/mlfoldersmodel.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/gui/qt/medialibrary/mlfoldersmodel.cpp b/modules/gui/qt/medialibrary/mlfoldersmodel.cpp
index a672350bc6..6d5d42d1c1 100644
--- a/modules/gui/qt/medialibrary/mlfoldersmodel.cpp
+++ b/modules/gui/qt/medialibrary/mlfoldersmodel.cpp
@@ -124,6 +124,8 @@ void MlFoldersModel::update()
for ( unsigned int i=0 ; i<entrypoints->i_nb_items ; i++ )
m_mrls.emplace_back( entrypoints->p_items[i] );
+ vlc_ml_release(entrypoints);
+
endResetModel();
}
--
2.26.1
More information about the vlc-devel
mailing list