[vlc-commits] Qt: fix memory leaks
Hannes Domani
git at videolan.org
Fri Jul 3 21:01:33 CEST 2015
vlc | branch: master | Hannes Domani <ssbssa at yahoo.de> | Fri Jul 3 14:32:28 2015 +0200| [4a0dd7a7e818ab5c7bdabfbb8ad04d77eea1b170] | committer: Rémi Denis-Courmont
Qt: fix memory leaks
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4a0dd7a7e818ab5c7bdabfbb8ad04d77eea1b170
---
modules/gui/qt4/components/open_panels.cpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index 5e61c71..6b88b5e 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -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
@@ -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 );
}
More information about the vlc-commits
mailing list