[vlc-devel] commit: Fix tiny memleak (Christophe Mutricy )

git version control git at videolan.org
Thu Aug 7 23:44:44 CEST 2008


vlc | branch: master | Christophe Mutricy <xtophe at videolan.org> | Thu Aug  7 20:40:35 2008 +0100| [9eb2d0755acbcc98d0e8e1da68c518e413906eb0] | committer: Christophe Mutricy 

Fix tiny memleak

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

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

diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index a463fce..3beeb3e 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -387,7 +387,9 @@ static void *Init( vlc_object_t *obj )
 #ifdef ENABLE_NLS
     // Translation - get locale
 #   if defined (WIN32) || defined (__APPLE__)
-    QString lang = qfu( config_GetPsz( p_intf, "language" ) );
+    char* psz_tmp = config_GetPsz( p_intf, "language" );
+    QString lang = qfu( psz_tmp );
+    free( psz_tmp;
     if (lang == "auto")
         lang = QLocale::system().name();
 #   else




More information about the vlc-devel mailing list