[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:50:00 CEST 2010


vlc/vlc-1.1 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Apr 29 18:41:05 2010 +0200| [71b24d1879f58755f38e268ed0fbd99dd9019c1a] | committer: Rémi Duraffort 

Qt4: fix a memleak in the extensions menu.
(cherry picked from commit c57caf76b5b779d964acd597bfbc76528eafaa04)

Signed-off-by: Rémi Duraffort <ivoire at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=71b24d1879f58755f38e268ed0fbd99dd9019c1a
---

 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