[vlc-commits] lua: memory leaks
Rémi Denis-Courmont
git at videolan.org
Wed Jan 13 17:38:17 CET 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jan 13 18:29:55 2016 +0200| [d88dd80b1b50eac36fc4c34425c96e681af5e593] | committer: Rémi Denis-Courmont
lua: memory leaks
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d88dd80b1b50eac36fc4c34425c96e681af5e593
---
modules/lua/libs/input.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules/lua/libs/input.c b/modules/lua/libs/input.c
index f251219..be1adf3 100644
--- a/modules/lua/libs/input.c
+++ b/modules/lua/libs/input.c
@@ -285,13 +285,17 @@ static int vlclua_input_item_is_preparsed( lua_State *L )
static int vlclua_input_item_uri( lua_State *L )
{
- lua_pushstring( L, input_item_GetURI( vlclua_input_item_get_internal( L ) ) );
+ char *uri = input_item_GetURI( vlclua_input_item_get_internal( L ) );
+ lua_pushstring( L, uri );
+ free( uri );
return 1;
}
static int vlclua_input_item_name( lua_State *L )
{
- lua_pushstring( L, input_item_GetName( vlclua_input_item_get_internal( L ) ) );
+ char *name = input_item_GetName( vlclua_input_item_get_internal( L ) );
+ lua_pushstring( L, name );
+ free( name );
return 1;
}
More information about the vlc-commits
mailing list