Nikolay Sivov : winemsibuilder: Use CRT allocation functions.
Alexandre Julliard
julliard at winehq.org
Tue Jul 5 15:55:05 CDT 2022
Module: wine
Branch: master
Commit: f059013a419e89c343fc657323b280521703daf1
URL: https://source.winehq.org/git/wine.git/?a=commit;h=f059013a419e89c343fc657323b280521703daf1
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Sun Jul 3 19:20:56 2022 +0300
winemsibuilder: Use CRT allocation functions.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
programs/winemsibuilder/main.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/programs/winemsibuilder/main.c b/programs/winemsibuilder/main.c
index 3b1221860b3..3bbd0735505 100644
--- a/programs/winemsibuilder/main.c
+++ b/programs/winemsibuilder/main.c
@@ -77,7 +77,7 @@ static int import_tables( const WCHAR *msifile, WCHAR **tables )
if (r != ERROR_SUCCESS) return 1;
len = GetCurrentDirectoryW( 0, NULL );
- if (!(dir = HeapAlloc( GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR) )))
+ if (!(dir = malloc( (len + 1) * sizeof(WCHAR) )))
{
MsiCloseHandle( hdb );
return 1;
@@ -102,7 +102,7 @@ static int import_tables( const WCHAR *msifile, WCHAR **tables )
WINE_ERR( "failed to commit changes (%u)\n", r );
}
- HeapFree( GetProcessHeap(), 0, dir );
+ free( dir );
MsiCloseHandle( hdb );
return (r != ERROR_SUCCESS);
}
@@ -135,7 +135,7 @@ static WCHAR *encode_stream( const WCHAR *in )
return NULL;
count += 2;
- if (!(out = HeapAlloc( GetProcessHeap(), 0, count * sizeof(WCHAR) ))) return NULL;
+ if (!(out = malloc( count * sizeof(WCHAR) ))) return NULL;
p = out;
while (count--)
{
@@ -162,7 +162,7 @@ static WCHAR *encode_stream( const WCHAR *in )
}
*p++ = c;
}
- HeapFree( GetProcessHeap(), 0, out );
+ free( out );
return NULL;
}
@@ -236,7 +236,7 @@ static int add_stream( const WCHAR *msifile, const WCHAR *stream, const WCHAR *f
ret = 0;
done:
- HeapFree( GetProcessHeap(), 0, encname );
+ free( encname );
if (stm) IStream_Release( stm );
IStorage_Release( stg );
return ret;
More information about the wine-cvs
mailing list