diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index 0cd531eee4b2dfe0f6a057dad2333c3870bb1ae2..413b96f707a59f219cc573688b3e62e6a339accd 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -2329,6 +2329,7 @@ NTSTATUS DIR_get_unix_cwd( char **cwd ) else status = FILE_GetNtStatus(); RtlLeaveCriticalSection( &dir_section ); + if (old_cwd != -1) close( old_cwd ); if (needs_close) close( unix_fd ); } if (!curdir->Handle) NtClose( handle );