Commit ea93da26 authored by Rémi Duraffort's avatar Rémi Duraffort

Fix memleak in lua module.

parent fdb91a06
......@@ -54,8 +54,12 @@ static int vlclua_config_get( lua_State *L )
case VLC_VAR_STRING:
case VLC_VAR_FILE:
case VLC_VAR_DIRECTORY:
lua_pushstring( L, config_GetPsz( p_this, psz_name ) );
{
char *psz = config_GetPsz( p_this, psz_name );
lua_pushstring( L, psz );
free( psz );
break;
}
case VLC_VAR_INTEGER:
lua_pushinteger( L, config_GetInt( p_this, psz_name ) );
......
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