[PATCH] wined3d: Avoid accessing freed memory in wined3d_view_gl_destroy() (Valgrind).

Liam Middlebrook lmiddlebrook at nvidia.com
Wed Feb 5 22:27:36 CST 2020


Signed-off-by: Liam Middlebrook <lmiddlebrook at nvidia.com>

On 2/2/20 5:45 AM, Sven Baars wrote:
> Signed-off-by: Sven Baars <sbaars at codeweavers.com>
> ---
>   dlls/wined3d/adapter_gl.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
> index 7e6f8a2817..634a0be36a 100644
> --- a/dlls/wined3d/adapter_gl.c
> +++ b/dlls/wined3d/adapter_gl.c
> @@ -4848,7 +4848,7 @@ static void wined3d_view_gl_destroy(struct wined3d_device *device,
>       ctx->free = ctx != &c ? ctx : NULL;
>   
>       wined3d_cs_destroy_object(device->cs, wined3d_view_gl_destroy_object, ctx);
> -    if (!ctx->free)
> +    if (ctx == &c)
>           device->cs->ops->finish(device->cs, WINED3D_CS_QUEUE_DEFAULT);
>   }
>   
> 

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------



More information about the wine-devel mailing list