[vlc-commits] commit: Qt4: fix a memleak in the extensions menu. ( Rémi Duraffort )
git at videolan.org
git at videolan.org
Thu Apr 29 18:49:01 CEST 2010
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Apr 29 18:41:05 2010 +0200| [c57caf76b5b779d964acd597bfbc76528eafaa04] | committer: Rémi Duraffort
Qt4: fix a memleak in the extensions menu.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c57caf76b5b779d964acd597bfbc76528eafaa04
---
modules/gui/qt4/extensions_manager.cpp | 3 +++
modules/misc/lua/extension.c | 2 +-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/modules/gui/qt4/extensions_manager.cpp b/modules/gui/qt4/extensions_manager.cpp
index c4b8978..a272465 100644
--- a/modules/gui/qt4/extensions_manager.cpp
+++ b/modules/gui/qt4/extensions_manager.cpp
@@ -171,12 +171,15 @@ void ExtensionsManager::menu( QMenu *current )
menuMapper->setMapping( action,
MENU_MAP( pi_ids[i], i_ext ) );
CONNECT( action, triggered(), menuMapper, map() );
+ free( ppsz_titles[i] );
}
if( !i_num )
{
action = submenu->addAction( qtr( "Empty" ) );
action->setEnabled( false );
}
+ free( ppsz_titles );
+ free( pi_ids );
}
else
{
diff --git a/modules/misc/lua/extension.c b/modules/misc/lua/extension.c
index 5e67582..4483b44 100644
--- a/modules/misc/lua/extension.c
+++ b/modules/misc/lua/extension.c
@@ -605,7 +605,7 @@ int lua_ExtensionWidgetClick( extensions_manager_t *p_mgr,
* @param p_mgr
* @param p_ext
* @param pppsz_titles Pointer to NULL. All strings must be freed by the caller
- * @param ppi_ids Pointer to NULL. Must be feed by the caller.
+ * @param ppi_ids Pointer to NULL. Must be freed by the caller.
* @note This function is allowed to run in the UI thread. This means
* that it MUST respond very fast.
* @todo Remove the menu() hook and provide a new function vlc.set_menu()
More information about the vlc-commits
mailing list