[vlc-commits] qt4: fix memory leaks
Rémi Duraffort
git at videolan.org
Fri Aug 9 10:28:57 CEST 2013
vlc/vlc-2.1 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Aug 8 18:43:44 2013 +0200| [8886ed12382bac34105435041f7412d3316d6a19] | committer: Jean-Baptiste Kempf
qt4: fix memory leaks
(cherry picked from commit 95f145933a553e082eb42577d72dbf8bdea9972b)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=8886ed12382bac34105435041f7412d3316d6a19
---
modules/gui/qt4/components/complete_preferences.cpp | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/modules/gui/qt4/components/complete_preferences.cpp b/modules/gui/qt4/components/complete_preferences.cpp
index 5048a0f..8269212 100644
--- a/modules/gui/qt4/components/complete_preferences.cpp
+++ b/modules/gui/qt4/components/complete_preferences.cpp
@@ -539,7 +539,10 @@ bool PrefsItemData::contains( const QString &text, Qt::CaseSensitivity cs )
}
if (name.contains( text, cs ) || head.contains( text, cs ) || help.contains( text, cs ))
+ {
+ module_config_free( p_config );
return true;
+ }
if( p_item ) do
{
@@ -555,7 +558,10 @@ bool PrefsItemData::contains( const QString &text, Qt::CaseSensitivity cs )
if( p_item->b_internal ) continue;
if ( p_item->psz_text && qtr( p_item->psz_text ).contains( text, cs ) )
+ {
+ module_config_free( p_config );
return true;
+ }
}
while (
!(
@@ -566,6 +572,7 @@ bool PrefsItemData::contains( const QString &text, Qt::CaseSensitivity cs )
&& ( ++p_item < p_end )
);
+ module_config_free( p_config );
return false;
}
@@ -592,7 +599,7 @@ AdvPrefsPanel::AdvPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
}
unsigned confsize;
- module_config_t *const p_config = module_config_get (p_module, &confsize),
+ module_config_t *const p_config = module_config_get( p_module, &confsize ),
*p_item = p_config,
*p_end = p_config + confsize;
@@ -723,6 +730,8 @@ AdvPrefsPanel::AdvPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
scroller->setWidgetResizable( true );
global_layout->addWidget( scroller );
setLayout( global_layout );
+
+ module_config_free( p_config );
}
void AdvPrefsPanel::apply()
More information about the vlc-commits
mailing list