From 23e13928607c4366e769b0e54f062feca67832d7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Andr=C3=A9?= Date: Mon, 8 Feb 2010 18:39:42 +0100 Subject: [PATCH] Lua SD: fix another obvious leak --- modules/misc/lua/libs/sd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/misc/lua/libs/sd.c b/modules/misc/lua/libs/sd.c index 846069116f..c2e68e366d 100644 --- a/modules/misc/lua/libs/sd.c +++ b/modules/misc/lua/libs/sd.c @@ -118,10 +118,10 @@ static int vlclua_sd_add_node( lua_State *L ) lua_getfield( L, -1, "title" ); if( lua_isstring( L, -1 ) ) { - input_item_t *p_input = input_item_New( p_sd, - "vlc://nop", - lua_tostring( L, -1 ) ); + char *name = strdup( lua_tostring( 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" ); if( lua_isstring( L, -1 ) ) { -- 2.39.5