Commit c49f09d6 authored by Rico Schüller's avatar Rico Schüller Committed by Alexandre Julliard

d3dcompiler: Fix HeapAlloc/HeapFree for type members in the reflection parser.

parent 66f212e6
......@@ -235,6 +235,7 @@ static void d3dcompiler_shader_reflection_type_destroy(struct wine_rb_entry *ent
{
free_type_member(&t->members[i]);
}
HeapFree(GetProcessHeap(), 0, t->members);
}
HeapFree(GetProcessHeap(), 0, t);
......@@ -1235,7 +1236,7 @@ static HRESULT d3dcompiler_parse_type(struct d3dcompiler_shader_reflection_type
{
const char *ptr2 = data + member_offset;
members = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*members));
members = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*members) * desc->Members);
if (!members)
{
ERR("Failed to allocate type memory.\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment