mirror of
https://github.com/reactos/reactos.git
synced 2025-07-24 13:53:41 +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:
parent
43e3abdd99
commit
159160db0d
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue