mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 21:44:16 +00:00
Fix memory leak and missing error check in dynamic function lookup
darcs-hash:20060213214416-ac50b-2bd8532aed600c06234e6fce500c737fcb415a5c.gz
This commit is contained in:
parent
6b393d35a9
commit
ea5e1b70db
1 changed files with 4 additions and 1 deletions
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue