Francois Gouget : d3dx9_36/tests: Replace a malloc() with HeapAlloc() +HeapFree().
Alexandre Julliard
julliard at winehq.org
Wed Mar 16 12:22:39 CDT 2011
Module: wine
Branch: master
Commit: cb5e480fafe55a14c79af59e20746d3e86f652f6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=cb5e480fafe55a14c79af59e20746d3e86f652f6
Author: Francois Gouget <fgouget at free.fr>
Date: Wed Mar 16 08:57:16 2011 +0100
d3dx9_36/tests: Replace a malloc() with HeapAlloc()+HeapFree().
---
dlls/d3dx9_36/tests/mesh.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
index 4f4adcf..b54a92b 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)
More information about the wine-cvs
mailing list