* libc/unix/getcwd.c (getcwd): Close directory also in case of an error.