Commit 4a0dd7a7 authored by Hannes Domani's avatar Hannes Domani Committed by Rémi Denis-Courmont

Qt: fix memory leaks

Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent c44b3d36
...@@ -340,7 +340,9 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -340,7 +340,9 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
}; };
QComboBox *discCombo = ui.deviceCombo; /* avoid namespacing in macro */ QComboBox *discCombo = ui.deviceCombo; /* avoid namespacing in macro */
POPULATE_WITH_DEVS( ppsz_discdevices, discCombo ); 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 ) if( temp != -1 )
ui.deviceCombo->setCurrentIndex( temp ); ui.deviceCombo->setCurrentIndex( temp );
#endif #endif
...@@ -400,7 +402,9 @@ void DiscOpenPanel::onFocus() ...@@ -400,7 +402,9 @@ void DiscOpenPanel::onFocus()
SetErrorMode(oldMode); 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 ) if( temp != -1 )
ui.deviceCombo->setCurrentIndex( temp ); ui.deviceCombo->setCurrentIndex( temp );
} }
......
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