Skip to content

Commit

Permalink
luasd: handle memory error on probing
Browse files Browse the repository at this point in the history
  • Loading branch information
linkfanel committed Nov 16, 2016
1 parent ec80ab8 commit 7f74ae2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/lua/vlc.c
Original file line number Diff line number Diff line change
Expand Up @@ -621,10 +621,12 @@ int vlclua_playlist_add_internal( vlc_object_t *p_this, lua_State *L,
static int vlc_sd_probe_Open( vlc_object_t *obj )
{
vlc_dictionary_t name_d;
vlc_dictionary_init( &name_d, 32 );

char **ppsz_dir_list;
vlclua_dir_list( "sd", &ppsz_dir_list );
if( vlclua_dir_list( "sd", &ppsz_dir_list ) )
return VLC_ENOMEM;

vlc_dictionary_init( &name_d, 32 );
for( char **ppsz_dir = ppsz_dir_list; *ppsz_dir; ppsz_dir++ )
{
char **ppsz_filelist;
Expand Down

0 comments on commit 7f74ae2

Please sign in to comment.