Fix memory leak and missing error check in dynamic function lookup

darcs-hash:20060213214416-ac50b-2bd8532aed600c06234e6fce500c737fcb415a5c.gz
This commit is contained in:
axel 2006-02-14 07:44:16 +10:00
parent 6b393d35a9
commit ea5e1b70db

View file

@ -88,6 +88,9 @@ static void autoload_names( array_list_t *out, int get_hidden )
{
wchar_t *ndir = (wchar_t *)al_get( &path_list, i );
DIR *dir = wopendir( ndir );
if( !dir )
continue;
struct wdirent *next;
while( (next=wreaddir(dir))!=0 )
{
@ -101,7 +104,7 @@ static void autoload_names( array_list_t *out, int get_hidden )
{
wchar_t *dup;
*suffix = 0;
dup = wcsdup( fn );
dup = intern( fn );
if( !dup )
die_mem();
al_push( out, dup );