mirror of
https://github.com/reactos/reactos.git
synced 2025-07-27 15:11:41 +00:00
[NTOS]: Close an opened handle after usage.
svn path=/trunk/; revision=74584
This commit is contained in:
parent
4baf3f8e4f
commit
2e25bf12d0
1 changed files with 4 additions and 1 deletions
|
@ -186,7 +186,7 @@ xHalpGetRDiskCount(VOID)
|
||||||
Skip = 0;
|
Skip = 0;
|
||||||
while (NT_SUCCESS(Status))
|
while (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
Status = NtQueryDirectoryObject (DirectoryHandle,
|
Status = ZwQueryDirectoryObject (DirectoryHandle,
|
||||||
DirectoryInfo,
|
DirectoryInfo,
|
||||||
2 * PAGE_SIZE,
|
2 * PAGE_SIZE,
|
||||||
FALSE,
|
FALSE,
|
||||||
|
@ -223,6 +223,9 @@ xHalpGetRDiskCount(VOID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ZwClose(DirectoryHandle);
|
||||||
|
|
||||||
ExFreePoolWithTag(DirectoryInfo, TAG_FILE_SYSTEM);
|
ExFreePoolWithTag(DirectoryInfo, TAG_FILE_SYSTEM);
|
||||||
return RDiskCount;
|
return RDiskCount;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue