d3dx9_36: Free object on error (coverity).

This commit is contained in:
André Hentschel 2012-10-25 21:29:23 +02:00 committed by Alexandre Julliard
parent 3abc425267
commit 904cdc46eb
1 changed files with 1 additions and 0 deletions

View File

@ -2559,6 +2559,7 @@ HRESULT WINAPI D3DXCreateMesh(DWORD numfaces, DWORD numvertices, DWORD options,
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ID3DXMeshImpl));
if (object == NULL || attrib_buffer == NULL)
{
HeapFree(GetProcessHeap(), 0, object);
HeapFree(GetProcessHeap(), 0, attrib_buffer);
IDirect3DIndexBuffer9_Release(index_buffer);
IDirect3DVertexBuffer9_Release(vertex_buffer);