d3drm: Avoid potential double free (Coverity).

This commit is contained in:
Marcus Meissner 2015-04-07 07:31:34 +02:00 committed by Alexandre Julliard
parent b4ec412203
commit 369cf7118b
1 changed files with 2 additions and 0 deletions

View File

@ -356,7 +356,9 @@ static void clean_mesh_builder_data(struct d3drm_mesh_builder *mesh_builder)
}
mesh_builder->nb_materials = 0;
HeapFree(GetProcessHeap(), 0, mesh_builder->materials);
mesh_builder->materials = NULL;
HeapFree(GetProcessHeap(), 0, mesh_builder->material_indices);
mesh_builder->material_indices = NULL;
}
static HRESULT WINAPI d3drm_mesh_builder2_QueryInterface(IDirect3DRMMeshBuilder2 *iface, REFIID riid, void **out)