[vlc-commits] lua: lua_ExecuteFunctionVa: Cleanup the stack in case of error
Hugo Beauzée-Luyssen
git at videolan.org
Thu Mar 30 16:51:59 CEST 2017
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Mar 30 16:50:44 2017 +0200| [4663244b65369d89d2fbf3f0c758208f5bdf9185] | committer: Hugo Beauzée-Luyssen
lua: lua_ExecuteFunctionVa: Cleanup the stack in case of error
Fix #5044
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4663244b65369d89d2fbf3f0c758208f5bdf9185
---
modules/lua/extension.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules/lua/extension.c b/modules/lua/extension.c
index 801134c..6077e30 100644
--- a/modules/lua/extension.c
+++ b/modules/lua/extension.c
@@ -924,6 +924,7 @@ int lua_ExecuteFunctionVa( extensions_manager_t *p_mgr, extension_t *p_ext,
{
msg_Warn( p_mgr, "Error while running script %s, "
"function %s() not found", p_ext->psz_name, psz_function );
+ lua_pop( L, 1 );
goto exit;
}
@@ -942,6 +943,8 @@ int lua_ExecuteFunctionVa( extensions_manager_t *p_mgr, extension_t *p_ext,
{
msg_Warn( p_mgr, "Undefined argument type %d to lua function %s"
"from script %s", type, psz_function, p_ext->psz_name );
+ if( i_args > 0 )
+ lua_pop( L, i_args );
goto exit;
}
i_args ++;
More information about the vlc-commits
mailing list