Skip to content

Commit

Permalink
Qt: fix memory leaks
Browse files Browse the repository at this point in the history
Signed-off-by: Rémi Denis-Courmont <[email protected]>
  • Loading branch information
ssbssa authored and Rémi Denis-Courmont committed Jul 3, 2015
1 parent c44b3d3 commit 4a0dd7a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions modules/gui/qt4/components/open_panels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -400,7 +402,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 );
}
Expand Down

0 comments on commit 4a0dd7a

Please sign in to comment.