Commit 71b24d18 authored by Rémi Duraffort's avatar Rémi Duraffort

Qt4: fix a memleak in the extensions menu.

(cherry picked from commit c57caf76b5b779d964acd597bfbc76528eafaa04)
Signed-off-by: default avatarRémi Duraffort <ivoire@videolan.org>
parent 7650974e
...@@ -171,12 +171,15 @@ void ExtensionsManager::menu( QMenu *current ) ...@@ -171,12 +171,15 @@ void ExtensionsManager::menu( QMenu *current )
menuMapper->setMapping( action, menuMapper->setMapping( action,
MENU_MAP( pi_ids[i], i_ext ) ); MENU_MAP( pi_ids[i], i_ext ) );
CONNECT( action, triggered(), menuMapper, map() ); CONNECT( action, triggered(), menuMapper, map() );
free( ppsz_titles[i] );
} }
if( !i_num ) if( !i_num )
{ {
action = submenu->addAction( qtr( "Empty" ) ); action = submenu->addAction( qtr( "Empty" ) );
action->setEnabled( false ); action->setEnabled( false );
} }
free( ppsz_titles );
free( pi_ids );
} }
else else
{ {
......
...@@ -605,7 +605,7 @@ int lua_ExtensionWidgetClick( extensions_manager_t *p_mgr, ...@@ -605,7 +605,7 @@ int lua_ExtensionWidgetClick( extensions_manager_t *p_mgr,
* @param p_mgr * @param p_mgr
* @param p_ext * @param p_ext
* @param pppsz_titles Pointer to NULL. All strings must be freed by the caller * @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 * @note This function is allowed to run in the UI thread. This means
* that it MUST respond very fast. * that it MUST respond very fast.
* @todo Remove the menu() hook and provide a new function vlc.set_menu() * @todo Remove the menu() hook and provide a new function vlc.set_menu()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment