From bc8735b2a07080a6a64293ac38ee9194d659d1e7 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Mon, 8 Nov 2010 13:01:11 -0600 Subject: [PATCH 2/2] d3dx9_36: Fix an error path in D3DXLoadSurfaceFromFileInMemory. If GetFrame fails, bitmapframe was not created and should not be released. --- dlls/d3dx9_36/surface.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c index afd0402..e4d1802 100644 --- a/dlls/d3dx9_36/surface.c +++ b/dlls/d3dx9_36/surface.c @@ -405,8 +405,9 @@ HRESULT WINAPI D3DXLoadSurfaceFromFileInMemory(LPDIRECT3DSURFACE9 pDestSurface, HeapFree(GetProcessHeap(), 0, buffer); } -cleanup_bmp: IWICBitmapFrameDecode_Release(bitmapframe); + +cleanup_bmp: IWICBitmapDecoder_Release(decoder); cleanup_err: -- 1.7.1