setupapi: Fix a leak on early return in SetupDiGetDriverInfoDetailA (Valgrind).

Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sven Baars 2020-04-17 20:20:10 +02:00 committed by Alexandre Julliard
parent 75e878346a
commit c85b140531
1 changed files with 3 additions and 0 deletions

View File

@ -4887,7 +4887,10 @@ BOOL WINAPI SetupDiGetDriverInfoDetailA(HDEVINFO devinfo, SP_DEVINFO_DATA *devic
if (ret_size)
*ret_size = size_needed;
if (!detail_data)
{
SetupCloseInfFile(hinf);
return TRUE;
}
detail_data->CompatIDsLength = detail_data->CompatIDsOffset = 0;
detail_data->HardwareID[0] = 0;