[PATCH 07/11] dxgi: Do not store IDXGIOutputs in IDXGIAdapter.

Henri Verbeet hverbeet at gmail.com
Wed Apr 13 05:35:05 CDT 2016


On 12 April 2016 at 12:29, Józef Kucia <jkucia at 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.



More information about the wine-devel mailing list