Author: hbelusca
Date: Thu May 18 23:32:00 2017
New Revision: 74584
URL:
http://svn.reactos.org/svn/reactos?rev=74584&view=rev
Log:
[NTOS]: Close an opened handle after usage.
Modified:
trunk/reactos/ntoskrnl/fstub/disksup.c
Modified: trunk/reactos/ntoskrnl/fstub/disksup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fstub/disksup.c?r…
==============================================================================
--- trunk/reactos/ntoskrnl/fstub/disksup.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/fstub/disksup.c [iso-8859-1] Thu May 18 23:32:00 2017
@@ -186,7 +186,7 @@
Skip = 0;
while (NT_SUCCESS(Status))
{
- Status = NtQueryDirectoryObject (DirectoryHandle,
+ Status = ZwQueryDirectoryObject (DirectoryHandle,
DirectoryInfo,
2 * PAGE_SIZE,
FALSE,
@@ -223,6 +223,9 @@
}
}
}
+
+ ZwClose(DirectoryHandle);
+
ExFreePoolWithTag(DirectoryInfo, TAG_FILE_SYSTEM);
return RDiskCount;
}