Commit e0966aca authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix memleak

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