Commit afd047d3 authored by Antoine Cellerier's avatar Antoine Cellerier

Backport [15468].

parent 8d86866c
...@@ -455,11 +455,17 @@ int utf8_scandir( const char *dirname, char ***namelist, ...@@ -455,11 +455,17 @@ int utf8_scandir( const char *dirname, char ***namelist,
goto error; goto error;
if( !select( utf_entry ) ) if( !select( utf_entry ) )
{
free( utf_entry );
continue; continue;
}
newtab = realloc( tab, sizeof( char * ) * (num + 1) ); newtab = realloc( tab, sizeof( char * ) * (num + 1) );
if( newtab == NULL ) if( newtab == NULL )
{
free( utf_entry );
goto error; goto error;
}
tab = newtab; tab = newtab;
tab[num++] = utf_entry; tab[num++] = utf_entry;
} }
......
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