[vlc-commits] commit: Qt4: fix memleak when album arts. ( Rémi Duraffort )

git at videolan.org git at videolan.org
Wed Jul 21 22:05:17 CEST 2010


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Jul 21 21:49:37 2010 +0200| [d4c7ef27dd409c192fcfec571921bd7f892eb5af] | committer: Rémi Denis-Courmont 

Qt4: fix memleak when album arts.

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

 modules/gui/qt4/input_manager.cpp |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index f7f3bfa..ebcc032 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -643,7 +643,10 @@ const QString InputManager::decodeArtURL( input_item_t *p_item )
     /* Taglib seems to define a attachment://, It won't work yet */
     url = url.replace( "attachment://", "" );
 #endif
-    return qfu( psz_art ? psz_art : "" );
+
+    QString path = qfu( psz_art ? psz_art : "" );
+    free( psz_art );
+    return path;
 }
 
 void InputManager::UpdateArt()



More information about the vlc-commits mailing list