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

git version control git at videolan.org
Thu Jul 31 18:47:36 CEST 2008


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Jul 31 18:50:07 2008 +0200| [03967e7ffa33848362d39bccd0af4b32b8c4e7f0]

Fix memleak in Qt interface.

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

 modules/gui/qt4/components/extended_panels.cpp |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/gui/qt4/components/extended_panels.cpp b/modules/gui/qt4/components/extended_panels.cpp
index 3560d7a..2085f6d 100644
--- a/modules/gui/qt4/components/extended_panels.cpp
+++ b/modules/gui/qt4/components/extended_panels.cpp
@@ -990,6 +990,7 @@ void Equalizer::updateUISliderValues( int i_preset )
     if( i_preset < 0 ) return;
 
     char *p = createValuesFromPreset( i_preset );
+    char *psz = p;
     float f_preamp = eqz_preset_10b[i_preset]->f_preamp;
 
     if ( p )
@@ -1008,6 +1009,7 @@ void Equalizer::updateUISliderValues( int i_preset )
             if( *p == '\0' )
                 break;
         }
+        free( psz );
     }
     ui.preampSlider->setValue( (int)( ( f_preamp + 20 ) * 10 ) );
     ui.preampLabel->setText( qtr( "Preamp\n" )




More information about the vlc-devel mailing list