mirror of
https://code.videolan.org/videolan/vlc
synced 2024-08-31 06:46:39 +02:00
lua: fix potential memleak.
This commit is contained in:
parent
03415034a1
commit
160324c6db
@ -224,11 +224,19 @@ int Open_LuaIntf( vlc_object_t *p_this )
|
||||
if( asprintf( &psz_command,
|
||||
"package.path = \"%s"DIR_SEP"modules"DIR_SEP"?.lua;\"..package.path",
|
||||
p_sys->psz_filename ) < 0 )
|
||||
{
|
||||
free( psz_name );
|
||||
free( p_sys );
|
||||
return VLC_EGENERIC;
|
||||
}
|
||||
*psz_char = DIR_SEP_CHAR;
|
||||
if( luaL_dostring( L, psz_command ) )
|
||||
{
|
||||
free( psz_name );
|
||||
free( p_sys );
|
||||
return VLC_EGENERIC;
|
||||
}
|
||||
}
|
||||
/* </gruik> */
|
||||
|
||||
psz_config = var_CreateGetString( p_intf, "lua-config" );
|
||||
|
Loading…
Reference in New Issue
Block a user