[vlc-devel] commit: LUA: fix memory leak (already fixed in 1.1) ( Rémi Denis-Courmont )
git version control
git at videolan.org
Mon Aug 24 22:12:34 CEST 2009
vlc | branch: 1.0-bugfix | Rémi Denis-Courmont <remi at remlab.net> | Mon Aug 24 23:12:16 2009 +0300| [cd4fd5e2af0afdc8f4324d033b51e3eb9a4c273f] | committer: Rémi Denis-Courmont
LUA: fix memory leak (already fixed in 1.1)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cd4fd5e2af0afdc8f4324d033b51e3eb9a4c273f
---
modules/misc/lua/libs/misc.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/modules/misc/lua/libs/misc.c b/modules/misc/lua/libs/misc.c
index 7aab9ec..3a390af 100644
--- a/modules/misc/lua/libs/misc.c
+++ b/modules/misc/lua/libs/misc.c
@@ -120,7 +120,9 @@ static int vlclua_datadir( lua_State *L )
static int vlclua_userdatadir( lua_State *L )
{
- lua_pushstring( L, config_GetUserDataDir() );
+ char *data = config_GetUserDataDir();
+ lua_pushstring( L, data );
+ free( data );
return 1;
}
More information about the vlc-devel
mailing list