wbemprox/tests: Fix memory leak when tests are skipped.
This commit is contained in:
parent
a5414e8bed
commit
a248418325
|
@ -158,7 +158,7 @@ static void test_Win32_Service( IWbemServices *services )
|
|||
if (hr != S_OK)
|
||||
{
|
||||
win_skip( "Win32_Service not available\n" );
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
type = 0xdeadbeef;
|
||||
VariantInit( &state );
|
||||
|
@ -232,6 +232,7 @@ static void test_Win32_Service( IWbemServices *services )
|
|||
ok( hr == S_OK, "got %08x\n", hr );
|
||||
if (service) IWbemClassObject_Release( service );
|
||||
|
||||
out:
|
||||
SysFreeString( empty );
|
||||
SysFreeString( class );
|
||||
}
|
||||
|
@ -373,14 +374,14 @@ static void test_Win32_ComputerSystem( IWbemServices *services )
|
|||
if (!compname[0] || !username[0])
|
||||
{
|
||||
skip( "Failed to get user or computer name\n" );
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
|
||||
hr = IWbemServices_ExecQuery( services, wql, query, 0, NULL, &result );
|
||||
if (hr != S_OK)
|
||||
{
|
||||
win_skip( "Win32_ComputerSystem not available\n" );
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
|
||||
hr = IEnumWbemClassObject_Next( result, 10000, 1, &service, &count );
|
||||
|
@ -406,6 +407,7 @@ static void test_Win32_ComputerSystem( IWbemServices *services )
|
|||
|
||||
IWbemClassObject_Release( service );
|
||||
IEnumWbemClassObject_Release( result );
|
||||
out:
|
||||
SysFreeString( query );
|
||||
SysFreeString( wql );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue