From cb5e480fafe55a14c79af59e20746d3e86f652f6 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Wed, 16 Mar 2011 08:57:16 +0100 Subject: [PATCH] d3dx9_36/tests: Replace a malloc() with HeapAlloc()+HeapFree(). --- dlls/d3dx9_36/tests/mesh.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c index 4f4adcf278f..b54a92b7085 100644 --- a/dlls/d3dx9_36/tests/mesh.c +++ b/dlls/d3dx9_36/tests/mesh.c @@ -2852,7 +2852,7 @@ static void test_createtext(IDirect3DDevice9 *device, HDC hdc, LPCSTR text, FLOA char name[256]; OUTLINETEXTMETRIC otm; GLYPHMETRICS gm; - GLYPHMETRICSFLOAT *glyphmetrics_float = malloc(sizeof(GLYPHMETRICSFLOAT) * strlen(text)); + GLYPHMETRICSFLOAT *glyphmetrics_float = HeapAlloc(GetProcessHeap(), 0, sizeof(GLYPHMETRICSFLOAT) * strlen(text)); int i; LOGFONT lf; HFONT font = NULL, oldfont = NULL; @@ -2913,6 +2913,7 @@ static void test_createtext(IDirect3DDevice9 *device, HDC hdc, LPCSTR text, FLOA d3dxmesh->lpVtbl->Release(d3dxmesh); SelectObject(hdc, oldfont); + HeapFree(GetProcessHeap(), 0, glyphmetrics_float); } static void D3DXCreateTextTest(void)