[vlc-commits] lua: libs: input: Fix potential input thread leak
Hugo Beauzée-Luyssen
git at videolan.org
Thu Sep 21 17:50:01 CEST 2017
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Sep 21 17:43:23 2017 +0200| [855374961aaaef95fa318f98fdd8f89edeb0116c] | committer: Hugo Beauzée-Luyssen
lua: libs: input: Fix potential input thread leak
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=855374961aaaef95fa318f98fdd8f89edeb0116c
---
modules/lua/libs/input.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules/lua/libs/input.c b/modules/lua/libs/input.c
index 4c07c3ad01..f98818c9cc 100644
--- a/modules/lua/libs/input.c
+++ b/modules/lua/libs/input.c
@@ -231,7 +231,10 @@ static int vlclua_input_add_subtitle( lua_State *L, bool b_path )
if( !p_input )
return luaL_error( L, "can't add subtitle: no current input" );
if( !lua_isstring( L, 1 ) )
+ {
+ vlc_object_release( p_input );
return luaL_error( L, "vlc.input.add_subtitle() usage: (path)" );
+ }
if( lua_gettop( L ) >= 2 )
b_autoselect = lua_toboolean( L, 2 );
const char *psz_sub = luaL_checkstring( L, 1 );
More information about the vlc-commits
mailing list