wined3d: Properly cleanup on failure in wined3d_cs_create().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
698d411467
commit
10e601ba3c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue