d3dx9_36: Free object on error (coverity)
André Hentschel
nerv at dawncrow.de
Thu Oct 25 14:29:23 CDT 2012
CID 713393
---
dlls/d3dx9_36/mesh.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c
index 3e8fc1f..77b724f 100644
--- a/dlls/d3dx9_36/mesh.c
+++ b/dlls/d3dx9_36/mesh.c
@@ -2557,6 +2557,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);
--
1.8.0
--
Best Regards, André Hentschel
More information about the wine-patches
mailing list