[vlc-commits] qt: mlfoldersmodel: fix memory leak

Alexandre Janniaux git at videolan.org
Fri Apr 17 17:40:16 CEST 2020


vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Wed Apr 15 16:02:55 2020 +0200| [d4419982ade7b6a3ce89558c71d13ce0b8c368cc] | committer: Alexandre Janniaux

qt: mlfoldersmodel: fix memory leak

The vlc_ml_entry_point_list_t must be released, which will release the
psz_mrl of each entrypoint at the same time.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d4419982ade7b6a3ce89558c71d13ce0b8c368cc
---

 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();
 }
 



More information about the vlc-commits mailing list