wbemprox: Use CRT memory allocation functions.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2022-04-12 09:28:23 +03:00 committed by Alexandre Julliard
parent 02faaea93b
commit c867e2daca
1 changed files with 3 additions and 3 deletions

View File

@ -113,7 +113,7 @@ static HRESULT get_sd( SECURITY_DESCRIPTOR **sd, DWORD *size )
*size = GetSecurityDescriptorLength( &absolute_sd ); *size = GetSecurityDescriptorLength( &absolute_sd );
*sd = HeapAlloc( GetProcessHeap(), 0, *size ); *sd = malloc( *size );
if (!*sd) if (!*sd)
hr = E_OUTOFMEMORY; hr = E_OUTOFMEMORY;
@ -121,7 +121,7 @@ static HRESULT get_sd( SECURITY_DESCRIPTOR **sd, DWORD *size )
{ {
if (!MakeSelfRelativeSD(&absolute_sd, *sd, size)) if (!MakeSelfRelativeSD(&absolute_sd, *sd, size))
{ {
HeapFree( GetProcessHeap(), 0, *sd ); free( *sd );
*sd = NULL; *sd = NULL;
hr = E_FAIL; hr = E_FAIL;
} }
@ -162,7 +162,7 @@ HRESULT security_get_sd( IWbemClassObject *obj, IWbemContext *context, IWbemClas
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
hr = IWbemClassObject_Put( out_params, L"SD", 0, &var_sd, CIM_UINT8|CIM_FLAG_ARRAY ); hr = IWbemClassObject_Put( out_params, L"SD", 0, &var_sd, CIM_UINT8|CIM_FLAG_ARRAY );
HeapFree( GetProcessHeap(), 0, sd ); free( sd );
VariantClear( &var_sd ); VariantClear( &var_sd );
} }