Alexandre Julliard : ntdll: Fix a file descriptor leak.
Module: wine Branch: master Commit: c1cb976b66deaf19b58bac9c0df83e1896a4797d URL: http://source.winehq.org/git/wine.git/?a=commit;h=c1cb976b66deaf19b58bac9c0d... Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 10 10:53:38 2009 +0200 ntdll: Fix a file descriptor leak. --- dlls/ntdll/directory.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index 0cd531e..413b96f 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 );
participants (1)
-
Alexandre Julliard