[vlc-devel] commit: Fix memleak in Qt interface. ( Rémi Duraffort )

git version control git at videolan.org
Fri Sep 5 21:36:11 CEST 2008


vlc | branch: 0.9-bugfix | Rémi Duraffort <ivoire at videolan.org> | Fri Sep  5 21:23:03 2008 +0200| [d54c78bcb42787f29d13a6bdad0c6f1c68af4c2d] | committer: Jean-Baptiste Kempf 

Fix memleak in Qt interface.
(cherry picked from commit b8b83532f0cf168caf84ad2606d5ed6c6fedcd2d)

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

 modules/gui/qt4/components/info_panels.cpp |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt4/components/info_panels.cpp b/modules/gui/qt4/components/info_panels.cpp
index 3f9742f..29e1757 100644
--- a/modules/gui/qt4/components/info_panels.cpp
+++ b/modules/gui/qt4/components/info_panels.cpp
@@ -198,10 +198,7 @@ void MetaPanel::update( input_item_t *p_item )
     /* URL / URI */
     psz_meta = input_item_GetURL( p_item );
     if( !EMPTY_STR( psz_meta ) )
-    {
         emit uriSet( QString( psz_meta ) );
-        free( psz_meta );
-    }
     else
     {
         free( psz_meta );
@@ -209,6 +206,7 @@ void MetaPanel::update( input_item_t *p_item )
         if( !EMPTY_STR( psz_meta ) )
             emit uriSet( QString( psz_meta ) );
     }
+    free( psz_meta );
 
     /* Other classic though */
     UPDATE_META( Artist, artist_text );




More information about the vlc-devel mailing list