Commit 05d386b4 authored by Rémi Duraffort's avatar Rémi Duraffort

qt4: fix memleak.

parent 6e484b0d
...@@ -870,7 +870,7 @@ void Equalizer::clean() ...@@ -870,7 +870,7 @@ void Equalizer::clean()
/* Write down initial values */ /* Write down initial values */
void Equalizer::updateUIFromCore() void Equalizer::updateUIFromCore()
{ {
char *psz_af; char *psz_af, *psz_pres;
float f_preamp; float f_preamp;
int i_preset; int i_preset;
...@@ -878,21 +878,21 @@ void Equalizer::updateUIFromCore() ...@@ -878,21 +878,21 @@ void Equalizer::updateUIFromCore()
if( p_aout ) if( p_aout )
{ {
psz_af = var_GetNonEmptyString( p_aout, "audio-filter" ); psz_af = var_GetNonEmptyString( p_aout, "audio-filter" );
psz_pres = var_GetString( p_aout, "equalizer-preset" );
if( var_GetBool( p_aout, "equalizer-2pass" ) ) if( var_GetBool( p_aout, "equalizer-2pass" ) )
ui.eq2PassCheck->setChecked( true ); ui.eq2PassCheck->setChecked( true );
f_preamp = var_GetFloat( p_aout, "equalizer-preamp" ); f_preamp = var_GetFloat( p_aout, "equalizer-preamp" );
i_preset = presetsComboBox->findData( QVariant( i_preset = presetsComboBox->findData( QVariant( psz_pres ) );
var_GetString( p_aout, "equalizer-preset" ) ) );
vlc_object_release( p_aout ); vlc_object_release( p_aout );
} }
else else
{ {
psz_af = config_GetPsz( p_intf, "audio-filter" ); psz_af = config_GetPsz( p_intf, "audio-filter" );
psz_pres = config_GetPsz( p_intf, "equalizer-preset" );
if( config_GetInt( p_intf, "equalizer-2pass" ) ) if( config_GetInt( p_intf, "equalizer-2pass" ) )
ui.eq2PassCheck->setChecked( true ); ui.eq2PassCheck->setChecked( true );
f_preamp = config_GetFloat( p_intf, "equalizer-preamp" ); f_preamp = config_GetFloat( p_intf, "equalizer-preamp" );
i_preset = presetsComboBox->findData( QVariant( i_preset = presetsComboBox->findData( QVariant( psz_pres ) );
config_GetPsz( p_intf, "equalizer-preset" ) ) );
} }
if( psz_af && strstr( psz_af, "equalizer" ) != NULL ) if( psz_af && strstr( psz_af, "equalizer" ) != NULL )
ui.enableCheck->setChecked( true ); ui.enableCheck->setChecked( true );
...@@ -901,6 +901,7 @@ void Equalizer::updateUIFromCore() ...@@ -901,6 +901,7 @@ void Equalizer::updateUIFromCore()
presetsComboBox->setCurrentIndex( i_preset ); presetsComboBox->setCurrentIndex( i_preset );
free( psz_af ); free( psz_af );
free( psz_pres );
} }
/* Functin called when enableButton is toggled */ /* Functin called when enableButton is toggled */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment