mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
- Fixed the parameters for NtOpenFile in InternalFindFirstFile.
- Closed the opened directory on error in InternalFindFirstFile. svn path=/trunk/; revision=14991
This commit is contained in:
@@ -256,8 +256,8 @@ InternalFindFirstFile (
|
||||
FILE_LIST_DIRECTORY,
|
||||
&ObjectAttributes,
|
||||
&IoStatusBlock,
|
||||
FILE_OPEN_IF,
|
||||
OPEN_EXISTING);
|
||||
FILE_SHARE_READ|FILE_SHARE_WRITE,
|
||||
FILE_DIRECTORY_FILE);
|
||||
|
||||
RtlFreeHeap (hProcessHeap,
|
||||
0,
|
||||
@@ -298,6 +298,7 @@ InternalFindFirstFile (
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT("Status %lx\n", Status);
|
||||
CloseHandle (IData->DirectoryHandle);
|
||||
RtlFreeHeap (hProcessHeap, 0, IData);
|
||||
SetLastErrorByStatus (Status);
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user