ntoskrnl.exe: Free device IDs from pool.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-06-05 09:22:12 -05:00 committed by Alexandre Julliard
parent 6937b98700
commit 533a426d14
1 changed files with 5 additions and 5 deletions

View File

@ -301,7 +301,7 @@ static void handle_bus_relations( DEVICE_OBJECT *device )
if (get_driver_for_id( ptr, driver )) if (get_driver_for_id( ptr, driver ))
break; break;
} }
RtlFreeHeap( GetProcessHeap(), 0, ids ); ExFreePool( ids );
if (!driver[0]) if (!driver[0])
{ {
@ -409,7 +409,7 @@ NTSTATUS WINAPI IoGetDeviceProperty( DEVICE_OBJECT *device, DEVICE_REGISTRY_PROP
else else
status = STATUS_BUFFER_TOO_SMALL; status = STATUS_BUFFER_TOO_SMALL;
HeapFree( GetProcessHeap(), 0, id ); ExFreePool( id );
break; break;
} }
case DevicePropertyPhysicalDeviceObjectName: case DevicePropertyPhysicalDeviceObjectName:
@ -658,17 +658,17 @@ NTSTATUS WINAPI IoRegisterDeviceInterface(DEVICE_OBJECT *device, const GUID *cla
HeapFree( GetProcessHeap(), 0, id ); HeapFree( GetProcessHeap(), 0, id );
if (!rc) if (!rc)
{ {
HeapFree( GetProcessHeap(), 0, instance_id ); ExFreePool( instance_id );
return STATUS_UNSUCCESSFUL; return STATUS_UNSUCCESSFUL;
} }
} }
else else
{ {
HeapFree( GetProcessHeap(), 0, instance_id ); ExFreePool( instance_id );
return STATUS_UNSUCCESSFUL; return STATUS_UNSUCCESSFUL;
} }
} }
HeapFree( GetProcessHeap(), 0, instance_id ); ExFreePool( instance_id );
if (!SetupDiCreateDeviceInterfaceW( set, &sp_device, class_guid, refstr ? refstr->Buffer : NULL, 0, &sp_iface )) if (!SetupDiCreateDeviceInterfaceW( set, &sp_device, class_guid, refstr ? refstr->Buffer : NULL, 0, &sp_iface ))
return STATUS_UNSUCCESSFUL; return STATUS_UNSUCCESSFUL;