[PATCH] d3d11: Fix freed memory access when releasing device context (Coverity).
Nikolay Sivov
nsivov at codeweavers.com
Wed Jun 9 00:57:39 CDT 2021
On 6/8/21 11:16 PM, Henri Verbeet wrote:
> 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.
Right, sorry. I sent another version.
More information about the wine-devel
mailing list