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

git at videolan.org git at videolan.org
Wed Jul 21 21:58:28 CEST 2010


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

Qt4: fix memleak when album arts.

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

 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