--- filesys.c.~1.127.~ 2004-07-24 09:08:47.000000000 +1000 +++ filesys.c 2004-07-24 18:55:19.000000000 +1000 @@ -1424,7 +1424,10 @@ newfd = open (SCM_STRING_CHARS (newfile), O_WRONLY | O_CREAT | O_TRUNC, oldstat.st_mode & 07777); if (newfd == -1) - SCM_SYSERROR; + { + close (oldfd); + SCM_SYSERROR; + } while ((n = read (oldfd, buf, sizeof buf)) > 0) if (write (newfd, buf, n) != n)