ntoskrnl: Do not destroy the device list in enumerate_new_device().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-02-01 22:16:20 -06:00 committed by Alexandre Julliard
parent cd27f3ca00
commit cb79644199
1 changed files with 0 additions and 4 deletions

View File

@ -336,7 +336,6 @@ static void enumerate_new_device( DEVICE_OBJECT *device, HDEVINFO set )
&& !SetupDiOpenDeviceInfoW( set, device_instance_id, NULL, 0, &sp_device ))
{
ERR("Failed to create or open device %s, error %#x.\n", debugstr_w(device_instance_id), GetLastError());
SetupDiDestroyDeviceInfoList( set );
return;
}
@ -353,10 +352,7 @@ static void enumerate_new_device( DEVICE_OBJECT *device, HDEVINFO set )
}
if (need_driver && !install_device_driver( device, set, &sp_device ))
{
SetupDiDestroyDeviceInfoList( set );
return;
}
start_device( device, set, &sp_device );
}