From: Hermès Bélusca-Maïto Date: Thu, 18 May 2017 23:32:00 +0000 (+0000) Subject: [NTOS]: Close an opened handle after usage. X-Git-Tag: ReactOS-0.4.6~682 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=2e25bf12d08bb1254b1625c2863c9843f98ef7de [NTOS]: Close an opened handle after usage. svn path=/trunk/; revision=74584 --- diff --git a/reactos/ntoskrnl/fstub/disksup.c b/reactos/ntoskrnl/fstub/disksup.c index d5b610873e5..09e55c31426 100644 --- a/reactos/ntoskrnl/fstub/disksup.c +++ b/reactos/ntoskrnl/fstub/disksup.c @@ -186,7 +186,7 @@ xHalpGetRDiskCount(VOID) Skip = 0; while (NT_SUCCESS(Status)) { - Status = NtQueryDirectoryObject (DirectoryHandle, + Status = ZwQueryDirectoryObject (DirectoryHandle, DirectoryInfo, 2 * PAGE_SIZE, FALSE, @@ -223,6 +223,9 @@ xHalpGetRDiskCount(VOID) } } } + + ZwClose(DirectoryHandle); + ExFreePoolWithTag(DirectoryInfo, TAG_FILE_SYSTEM); return RDiskCount; }