Vincent Povirk : d3dx9_36: Fix an error path in D3DXLoadSurfaceFromFileInMemory.

Alexandre Julliard julliard at winehq.org
Tue Nov 9 13:13:21 CST 2010


Module: wine
Branch: master
Commit: 1d0f126d913dcbb7b623dcc16b5d9c67cd30fa50
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1d0f126d913dcbb7b623dcc16b5d9c67cd30fa50

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Mon Nov  8 13:01:11 2010 -0600

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:




More information about the wine-cvs mailing list