]> git.sesse.net Git - vlc/commitdiff
Qt4: fix a memleak in the extensions menu.
authorRémi Duraffort <ivoire@videolan.org>
Thu, 29 Apr 2010 16:41:05 +0000 (18:41 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Thu, 29 Apr 2010 16:48:27 +0000 (18:48 +0200)
modules/gui/qt4/extensions_manager.cpp
modules/misc/lua/extension.c

index c4b89783624a178810ae6b2c2cdc4858dbf0cfc4..a2724657b2959473ca1826d958e3ec584e5b79cd 100644 (file)
@@ -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
             {
index 5e6758298659e210bbeff2a037a6f5c503f24d2b..4483b4441206c691d56e663915f4b80fcf6fbdff 100644 (file)
@@ -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()