[vlc-commits] lua: close lua state after deactivating extension
Pierre Lamot
git at videolan.org
Wed Jan 24 08:29:54 CET 2018
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Mon Jan 22 17:28:53 2018 +0100| [e5bc7ca672b5fdc1d265f77e50d9564f7fa6ba57] | committer: Jean-Baptiste Kempf
lua: close lua state after deactivating extension
fix: #19509
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e5bc7ca672b5fdc1d265f77e50d9564f7fa6ba57
---
modules/lua/extension.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/modules/lua/extension.c b/modules/lua/extension.c
index 342ce21827..10ec8c82cc 100644
--- a/modules/lua/extension.c
+++ b/modules/lua/extension.c
@@ -678,7 +678,14 @@ int lua_ExtensionDeactivate( extensions_manager_t *p_mgr, extension_t *p_ext )
p_ext->p_sys->p_input = NULL;
}
- return lua_ExecuteFunction( p_mgr, p_ext, "deactivate", LUA_END );
+ int i_ret = lua_ExecuteFunction( p_mgr, p_ext, "deactivate", LUA_END );
+
+ if ( p_ext->p_sys->L == NULL )
+ return VLC_EGENERIC;
+ lua_close( p_ext->p_sys->L );
+ p_ext->p_sys->L = NULL;
+
+ return i_ret;
}
int lua_ExtensionWidgetClick( extensions_manager_t *p_mgr,
More information about the vlc-commits
mailing list