Commit cb6983fb authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

wineboot: Use WIN32_LEAN_AND_MEAN.

Use HeapAlloc/HeapFree instead of malloc/free.
parent 91199249
...@@ -51,6 +51,8 @@ ...@@ -51,6 +51,8 @@
* processed (requires translations from Unicode to Ansi). * processed (requires translations from Unicode to Ansi).
*/ */
#define WIN32_LEAN_AND_MEAN
#include <stdio.h> #include <stdio.h>
#include <windows.h> #include <windows.h>
#include <wine/debug.h> #include <wine/debug.h>
...@@ -240,7 +242,7 @@ static BOOL pendingRename(void) ...@@ -240,7 +242,7 @@ static BOOL pendingRename(void)
goto end; goto end;
} }
buffer=malloc( dataLength ); buffer=HeapAlloc( GetProcessHeap(),0,dataLength );
if( buffer==NULL ) if( buffer==NULL )
{ {
WINE_ERR("Couldn't allocate %lu bytes for the value\n", dataLength ); WINE_ERR("Couldn't allocate %lu bytes for the value\n", dataLength );
...@@ -325,7 +327,7 @@ static BOOL pendingRename(void) ...@@ -325,7 +327,7 @@ static BOOL pendingRename(void)
end: end:
if( buffer!=NULL ) if( buffer!=NULL )
free(buffer); HeapFree(GetProcessHeap(), 0, buffer);
if( hSession!=NULL ) if( hSession!=NULL )
RegCloseKey( hSession ); RegCloseKey( hSession );
...@@ -460,7 +462,7 @@ static BOOL ProcessRunKeys( HKEY hkRoot, LPCWSTR szKeyName, BOOL bDelete, ...@@ -460,7 +462,7 @@ static BOOL ProcessRunKeys( HKEY hkRoot, LPCWSTR szKeyName, BOOL bDelete,
goto end; goto end;
} }
if( (szCmdLine=malloc(nMaxCmdLine))==NULL ) if( (szCmdLine=HeapAlloc(GetProcessHeap(),0,nMaxCmdLine))==NULL )
{ {
WINE_ERR("Couldn't allocate memory for the commands to be executed\n"); WINE_ERR("Couldn't allocate memory for the commands to be executed\n");
...@@ -468,7 +470,7 @@ static BOOL ProcessRunKeys( HKEY hkRoot, LPCWSTR szKeyName, BOOL bDelete, ...@@ -468,7 +470,7 @@ static BOOL ProcessRunKeys( HKEY hkRoot, LPCWSTR szKeyName, BOOL bDelete,
goto end; goto end;
} }
if( (szValue=malloc((++nMaxValue)*sizeof(*szValue)))==NULL ) if( (szValue=HeapAlloc(GetProcessHeap(),0,(++nMaxValue)*sizeof(*szValue)))==NULL )
{ {
WINE_ERR("Couldn't allocate memory for the value names\n"); WINE_ERR("Couldn't allocate memory for the value names\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment