Commit 670d6391 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

msvfw32/tests: Use CRT allocation functions.

parent abbc88f4
......@@ -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;
......
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