[vlc-devel] commit: Qt_playlist_selector: fix a memleak. ( Rémi Duraffort )

git version control git at videolan.org
Thu Oct 15 09:20:21 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Oct 15 09:08:58 2009 +0200| [e7aa8aa605d8838f86c4c2b7e653ff6f26cb4a55] | committer: Rémi Duraffort 

Qt_playlist_selector: fix a memleak.

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

 modules/gui/qt4/components/playlist/selector.cpp |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/selector.cpp b/modules/gui/qt4/components/playlist/selector.cpp
index fb1f04f..42076f9 100644
--- a/modules/gui/qt4/components/playlist/selector.cpp
+++ b/modules/gui/qt4/components/playlist/selector.cpp
@@ -137,7 +137,11 @@ void PLSelector::createItems()
         sd_item->setData( 0, NAME_ROLE, qfu( *ppsz_name ) );
         sd_item->setFlags( sd_item->flags() & ~Qt::ItemIsDropEnabled );
         sds->addChild( sd_item );
+        free( *ppsz_name );
+        free( *ppsz_longname );
     }
+    free( ppsz_names );
+    free( ppsz_longnames );
 }
 
 QStringList PLSelector::mimeTypes() const




More information about the vlc-devel mailing list