[PATCH 3/4] wined3d: Create device wined3d_state dynamically.

Rémi Bernon rbernon at codeweavers.com
Thu Feb 18 08:14:16 CST 2021


On 2/18/21 3:06 PM, Henri Verbeet wrote:
> On Thu, 18 Feb 2021 at 13:31, Rémi Bernon <rbernon at codeweavers.com> wrote:
>> @@ -6013,8 +6015,15 @@ HRESULT wined3d_device_init(struct wined3d_device *device, struct wined3d *wined
>>           return hr;
>>       }
>>
>> +    if (!(state = heap_alloc(sizeof(*state))))
>> +    {
>> +        hr = E_OUTOFMEMORY;
>> +        goto err;
>> +    }
>> +    memset(state, 0, sizeof(*state));
> 
> That should probably use heap_alloc_zero().
> 

Yeah, it was initially like that, then I thought the next change 
replacing memset + state_init with state_reset would also be apply there.
-- 
Rémi Bernon <rbernon at codeweavers.com>



More information about the wine-devel mailing list