ntoskrnl.exe: Use proper device handle in DevicePropertyPhysicalDeviceObjectName implementation.
Spotted by Huw Davies. Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
38bdd6fc5c
commit
c1fb240f0c
|
@ -1831,8 +1831,11 @@ NTSTATUS WINAPI IoGetDeviceProperty( DEVICE_OBJECT *device, DEVICE_REGISTRY_PROP
|
|||
{
|
||||
ULONG used_len, len = buffer_length + sizeof(OBJECT_NAME_INFORMATION);
|
||||
OBJECT_NAME_INFORMATION *name = HeapAlloc(GetProcessHeap(), 0, len);
|
||||
HANDLE handle;
|
||||
|
||||
status = NtQueryObject(device->Reserved, ObjectNameInformation, name, len, &used_len);
|
||||
handle = kernel_object_handle( device, 0 );
|
||||
status = NtQueryObject( handle, ObjectNameInformation, name, len, &used_len );
|
||||
NtClose( handle );
|
||||
if (status == STATUS_SUCCESS)
|
||||
{
|
||||
/* Ensure room for NULL termination */
|
||||
|
|
Loading…
Reference in New Issue