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

git version control git at videolan.org
Fri Aug 1 17:03:03 CEST 2008


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Aug  1 17:06:21 2008 +0200| [4e9597b800d1140dfab1cf33c3df8c608d58878f] | committer: Rémi Duraffort 

Less memleaks in Qt interface.

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

 modules/gui/qt4/components/simple_preferences.cpp |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp
index 7be48f3..28ac5fa 100644
--- a/modules/gui/qt4/components/simple_preferences.cpp
+++ b/modules/gui/qt4/components/simple_preferences.cpp
@@ -101,6 +101,7 @@ void SPrefsCatList::switchPanel( int i )
 SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
                           int _number ) : QWidget( _parent ), p_intf( _p_intf )
 {
+printf( "SPrefsPanel::SPrefsPanel\n" );
     module_config_t *p_config;
     ConfigControl *control;
     number = _number;
@@ -334,7 +335,9 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
 
             CONNECT( ui.volNormBox, toggled( bool ), ui.volNormSpin,
                      setEnabled( bool ) );
-            qs_filter = qfu( config_GetPsz( p_intf, "audio-filter" ) );
+            char* psz = config_GetPsz( p_intf, "audio-filter" );
+            qs_filter = qfu( psz );
+            free( psz );
             bool b_normalizer = ( qs_filter.contains( "volnorm" ) );
             {
                 ui.volNormBox->setChecked( b_normalizer );
@@ -381,7 +384,9 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
             ui.systemCodecBox->hide();
 #endif
             /* Access Filters */
-            qs_filter = qfu( config_GetPsz( p_intf, "access-filter" ) );
+            char* psz = config_GetPsz( p_intf, "access-filter" );
+            qs_filter = qfu( psz );
+            free( psz );
             ui.timeshiftBox->setChecked( qs_filter.contains( "timeshift" ) );
             ui.dumpBox->setChecked( qs_filter.contains( "dump" ) );
             ui.recordBox->setChecked( qs_filter.contains( "record" ) );




More information about the vlc-devel mailing list