msvfw32/tests: Use CRT allocation functions.
This commit is contained in:
parent
abbc88f4a1
commit
670d6391c4
2 changed files with 6 additions and 7 deletions
|
@ -63,7 +63,7 @@ static char *hash_dib(const BITMAPINFO *bmi, const void *bits)
|
|||
CryptGetHashParam(hash, HP_HASHVAL, hash_buf, &hash_size, 0);
|
||||
CryptDestroyHash(hash);
|
||||
|
||||
buf = HeapAlloc(GetProcessHeap(), 0, hash_size * 2 + 1);
|
||||
buf = malloc(hash_size * 2 + 1);
|
||||
|
||||
for(i = 0; i < hash_size; i++)
|
||||
{
|
||||
|
@ -131,7 +131,7 @@ static void test_DrawDib_sizeimage(void)
|
|||
|
||||
init_bmi(&src_info, WIDTH, HEIGHT, 0);
|
||||
src_dib_size = get_dib_size(&src_info);
|
||||
src_bits = HeapAlloc(GetProcessHeap(), 0, src_dib_size);
|
||||
src_bits = malloc(src_dib_size);
|
||||
ok(src_bits != NULL, "Can't allocate memory\n");
|
||||
memset(src_bits, 0x88, src_dib_size);
|
||||
|
||||
|
@ -160,13 +160,13 @@ static void test_DrawDib_sizeimage(void)
|
|||
ok(strcmp(hash, test_data[i].hash) == 0,
|
||||
"[%u] got %s, expected %s\n",
|
||||
i, hash, test_data[i].hash);
|
||||
HeapFree(GetProcessHeap(), 0, hash);
|
||||
free(hash);
|
||||
}
|
||||
|
||||
r = DrawDibClose(hdd);
|
||||
ok(r, "DrawDibClose failed\n");
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, src_bits);
|
||||
free(src_bits);
|
||||
|
||||
DeleteDC(hdc);
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include <windows.h>
|
||||
#include <vfw.h>
|
||||
|
||||
#include "wine/heap.h"
|
||||
#include "wine/test.h"
|
||||
|
||||
static const DWORD file_header[] = /* file_header */
|
||||
|
@ -136,7 +135,7 @@ static BOOL create_avi_file(char *fname)
|
|||
if (hFile == INVALID_HANDLE_VALUE) return FALSE;
|
||||
|
||||
buffer_length = padding[1];
|
||||
buffer = heap_alloc_zero(buffer_length);
|
||||
buffer = calloc(1, buffer_length);
|
||||
|
||||
WriteFile(hFile, file_header, sizeof(file_header), &written, NULL);
|
||||
WriteFile(hFile, &main_avi_header, sizeof(MainAVIHeader), &written, NULL);
|
||||
|
@ -147,7 +146,7 @@ static BOOL create_avi_file(char *fname)
|
|||
WriteFile(hFile, buffer, buffer_length, &written, NULL);
|
||||
WriteFile(hFile, data, sizeof(data), &written, NULL);
|
||||
|
||||
heap_free(buffer);
|
||||
free(buffer);
|
||||
|
||||
CloseHandle(hFile);
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Reference in a new issue