[PATCH] d3d11: Fix freed memory access when releasing device context (Coverity).

Henri Verbeet hverbeet at gmail.com
Tue Jun 8 15:16:03 CDT 2021


On Tue, 8 Jun 2021 at 17:08, Nikolay Sivov <nsivov at codeweavers.com> wrote:
>      if (!refcount)
>      {
> +        ID3D11Device2_Release(&context->device->ID3D11Device2_iface);
>          if (context->type != D3D11_DEVICE_CONTEXT_IMMEDIATE)
>          {
>              wined3d_deferred_context_destroy(context->wined3d_context);
>              d3d11_device_context_cleanup(context);
>              heap_free(context);
>          }
> -        ID3D11Device2_Release(&context->device->ID3D11Device2_iface);
>      }
That's not much better though; in case of an immediate context,
"context" may be freed by releasing the device reference.



More information about the wine-devel mailing list