Commit 23e13928 authored by Jean-Philippe André's avatar Jean-Philippe André

Lua SD: fix another obvious leak

parent 98c78b8b
...@@ -118,10 +118,10 @@ static int vlclua_sd_add_node( lua_State *L ) ...@@ -118,10 +118,10 @@ static int vlclua_sd_add_node( lua_State *L )
lua_getfield( L, -1, "title" ); lua_getfield( L, -1, "title" );
if( lua_isstring( L, -1 ) ) if( lua_isstring( L, -1 ) )
{ {
input_item_t *p_input = input_item_New( p_sd, char *name = strdup( lua_tostring( L, -1 ) );
"vlc://nop",
lua_tostring( L, -1 ) );
lua_pop( L, 1 ); lua_pop( L, 1 );
input_item_t *p_input = input_item_New( p_sd, "vlc://nop", name );
free( name );
lua_getfield( L, -1, "arturl" ); lua_getfield( L, -1, "arturl" );
if( lua_isstring( L, -1 ) ) if( lua_isstring( L, -1 ) )
{ {
......
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