Nikolay Sivov : wbemprox: Use CRT memory allocation functions.

Alexandre Julliard julliard at winehq.org
Tue Apr 12 15:35:15 CDT 2022


Module: wine
Branch: master
Commit: c867e2daca6f7af3724f3a8918b3fd97d11926f4
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=c867e2daca6f7af3724f3a8918b3fd97d11926f4

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Tue Apr 12 09:28:23 2022 +0300

wbemprox: Use CRT memory allocation functions.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wbemprox/security.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/wbemprox/security.c b/dlls/wbemprox/security.c
index a27cca798f3..df8c55c48fc 100644
--- a/dlls/wbemprox/security.c
+++ b/dlls/wbemprox/security.c
@@ -113,7 +113,7 @@ static HRESULT get_sd( SECURITY_DESCRIPTOR **sd, DWORD *size )
 
     *size = GetSecurityDescriptorLength( &absolute_sd );
 
-    *sd = HeapAlloc( GetProcessHeap(), 0, *size );
+    *sd = malloc( *size );
     if (!*sd)
         hr = E_OUTOFMEMORY;
 
@@ -121,7 +121,7 @@ static HRESULT get_sd( SECURITY_DESCRIPTOR **sd, DWORD *size )
     {
         if (!MakeSelfRelativeSD(&absolute_sd, *sd, size))
         {
-            HeapFree( GetProcessHeap(), 0, *sd );
+            free( *sd );
             *sd = NULL;
             hr = E_FAIL;
         }
@@ -162,7 +162,7 @@ HRESULT security_get_sd( IWbemClassObject *obj, IWbemContext *context, IWbemClas
             if (SUCCEEDED(hr))
                 hr = IWbemClassObject_Put( out_params, L"SD", 0, &var_sd, CIM_UINT8|CIM_FLAG_ARRAY );
 
-            HeapFree( GetProcessHeap(), 0, sd );
+            free( sd );
             VariantClear( &var_sd );
         }
 




More information about the wine-cvs mailing list