[cvs-nhc98] When an 'opendir' failed it created a foreign object with
Malcolm Wallace
malcolm@sparud.net
Tue, 23 Apr 2002 15:42:47 +0200 (CEST)
malcolm: Tue Apr 23 15:42:46 CEST 2002
Update of /usr/src/master/nhc/src/prelude/Directory
In directory hinken:/tmp/cvs-serv14575/src/prelude/Directory
Modified Files:
GetDirectoryContents.gc
Log Message:
When an 'opendir' failed it created a foreign object with a 'cval' of
'NULL'. During garbage collection the finalizer 'closedir' was be
called with a 'NULL' pointer argument, leading to a core dump. This
patch makes closedir aware of failed 'opendir' and also uses the
haskell greencard version as the finalizer instead of using the C
library function directly. (From Thomas Nordin.)