On 12 April 2016 at 12:29, Józef Kucia jkucia@codeweavers.com wrote:
+HRESULT dxgi_output_create(struct dxgi_adapter *adapter, struct dxgi_output **output) +{
- if (!(*output = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(**output))))
- {
*output = NULL;
return E_OUTOFMEMORY;
- }
Explicitly setting output variables to NULL on failure can be ok (although I don't think it's needed for dxgi_output_create()), but note that *output is already NULL when HeapAlloc() fails.