mirror of
https://github.com/reactos/reactos.git
synced 2025-07-27 07:41:51 +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,
|
FILE_LIST_DIRECTORY,
|
||||||
&ObjectAttributes,
|
&ObjectAttributes,
|
||||||
&IoStatusBlock,
|
&IoStatusBlock,
|
||||||
FILE_OPEN_IF,
|
FILE_SHARE_READ|FILE_SHARE_WRITE,
|
||||||
OPEN_EXISTING);
|
FILE_DIRECTORY_FILE);
|
||||||
|
|
||||||
RtlFreeHeap (hProcessHeap,
|
RtlFreeHeap (hProcessHeap,
|
||||||
0,
|
0,
|
||||||
|
@ -298,6 +298,7 @@ InternalFindFirstFile (
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT("Status %lx\n", Status);
|
DPRINT("Status %lx\n", Status);
|
||||||
|
CloseHandle (IData->DirectoryHandle);
|
||||||
RtlFreeHeap (hProcessHeap, 0, IData);
|
RtlFreeHeap (hProcessHeap, 0, IData);
|
||||||
SetLastErrorByStatus (Status);
|
SetLastErrorByStatus (Status);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue