Commit c1fb240f authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

ntoskrnl.exe: Use proper device handle in DevicePropertyPhysicalDeviceObjectName implementation.

Spotted by Huw Davies. Signed-off-by: 's avatarJacek Caban <jacek@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 38bdd6fc
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment