From 9ad6d62b37f3629eb582523cbfb9ff8f1759a8c5 Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Thu, 7 Jun 2007 01:12:42 +0000 Subject: [PATCH] Fixing another bugm, leaking memory, it will when we trying alloc memory for FourCC, this bug fix it and I manger come bit futher with my werid crash svn path=/trunk/; revision=27031 --- reactos/dll/directx/ddraw/startup.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/reactos/dll/directx/ddraw/startup.c b/reactos/dll/directx/ddraw/startup.c index 0306ffb3213..4349736793d 100644 --- a/reactos/dll/directx/ddraw/startup.c +++ b/reactos/dll/directx/ddraw/startup.c @@ -485,7 +485,11 @@ StartDirectDrawHal(LPDIRECTDRAW iface, BOOL reenable) DX_STUB_str("Here\n"); /* Alloc mpFourCC */ - + if (This->lpLcl->lpGbl->lpdwFourCC != NULL) + { + DxHeapMemFree(This->lpLcl->lpGbl->lpdwFourCC); + } + // if (mHALInfo.ddCaps.dwNumFourCCCodes > 0 ) // { //mpFourCC = (DWORD *) DxHeapMemAlloc( sizeof(DWORD) * 21); @@ -513,6 +517,12 @@ StartDirectDrawHal(LPDIRECTDRAW iface, BOOL reenable) /* Alloc mpTextures */ #if 0 + + if (This->lpLcl->lpGbl->texture != NULL) + { + DxHeapMemFree(This->lpLcl->lpGbl->texture; + } + mpTextures = NULL; if (mD3dDriverData.dwNumTextureFormats > 0) {