d3d9: Free "elements" in a vertexdeclaration_init() error path (Valgrind).

This commit is contained in:
Henri Verbeet 2009-10-22 10:09:57 +02:00 committed by Alexandre Julliard
parent a927573395
commit 66961840a5
1 changed files with 1 additions and 0 deletions

View File

@ -405,6 +405,7 @@ HRESULT vertexdeclaration_init(IDirect3DVertexDeclaration9Impl *declaration,
HeapFree(GetProcessHeap(), 0, wined3d_elements);
if (FAILED(hr))
{
HeapFree(GetProcessHeap(), 0, declaration->elements);
WARN("Failed to create wined3d vertex declaration, hr %#x.\n", hr);
return hr;
}