vlc/vlc-2.2 | branch: master | Hannes Domani <ssb...@yahoo.de> | Fri Jul  3 
14:32:28 2015 +0200| [0c92770330556cd5b579ce4e38392b8f32d82018] | committer: 
Jean-Baptiste Kempf

Qt: fix memory leaks

Signed-off-by: RĂ©mi Denis-Courmont <r...@remlab.net>
(cherry picked from commit 4a0dd7a7e818ab5c7bdabfbb8ad04d77eea1b170)
Signed-off-by: Jean-Baptiste Kempf <j...@videolan.org>

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

 modules/gui/qt4/components/open_panels.cpp |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt4/components/open_panels.cpp 
b/modules/gui/qt4/components/open_panels.cpp
index 53059c9..92300be 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -340,7 +340,9 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, 
intf_thread_t *_p_intf ) :
     };
     QComboBox *discCombo = ui.deviceCombo; /* avoid namespacing in macro */
     POPULATE_WITH_DEVS( ppsz_discdevices, discCombo );
-    int temp = ui.deviceCombo->findData( config_GetPsz( p_intf, "dvd" ), 
Qt::UserRole, Qt::MatchStartsWith );
+    char *psz_config = config_GetPsz( p_intf, "dvd" );
+    int temp = ui.deviceCombo->findData( psz_config, Qt::UserRole, 
Qt::MatchStartsWith );
+    free( psz_config );
     if( temp != -1 )
         ui.deviceCombo->setCurrentIndex( temp );
 #endif
@@ -399,7 +401,9 @@ void DiscOpenPanel::onFocus()
         SetErrorMode(oldMode);
     }
 
-    int temp = ui.deviceCombo->findData( config_GetPsz( p_intf, "dvd" ), 
Qt::UserRole, Qt::MatchStartsWith );
+    char *psz_config = config_GetPsz( p_intf, "dvd" );
+    int temp = ui.deviceCombo->findData( psz_config, Qt::UserRole, 
Qt::MatchStartsWith );
+    free( psz_config );
     if( temp != -1 )
         ui.deviceCombo->setCurrentIndex( temp );
 }

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to