d3dx9_36: Fix an error path in D3DXLoadSurfaceFromFileInMemory.

If GetFrame fails, bitmapframe was not created and should not be released.
This commit is contained in:
Vincent Povirk 2010-11-08 13:01:11 -06:00 committed by Alexandre Julliard
parent 31682b3dbe
commit 1d0f126d91
1 changed files with 2 additions and 1 deletions

View File

@ -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: