Commit 10e601ba authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Properly cleanup on failure in wined3d_cs_create().

parent 698d4114
......@@ -1144,6 +1144,8 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
cs->data_size = WINED3D_INITIAL_CS_SIZE;
if (!(cs->data = HeapAlloc(GetProcessHeap(), 0, cs->data_size)))
{
state_cleanup(&cs->state);
HeapFree(GetProcessHeap(), 0, cs->fb.render_targets);
HeapFree(GetProcessHeap(), 0, cs);
return NULL;
}
......
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