[Mesa-dev] [PATCH] gallium/postprocessing: fix crash at context destruction

Michel Dänzer michel at daenzer.net
Thu Feb 5 19:16:44 PST 2015


On 06.02.2015 02:31, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
> 
> ---
>  src/gallium/state_trackers/dri/dri_context.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/src/gallium/state_trackers/dri/dri_context.c b/src/gallium/state_trackers/dri/dri_context.c
> index 84b8807..8ac81b7 100644
> --- a/src/gallium/state_trackers/dri/dri_context.c
> +++ b/src/gallium/state_trackers/dri/dri_context.c
> @@ -165,6 +165,9 @@ dri_destroy_context(__DRIcontext * cPriv)
>        hud_destroy(ctx->hud);
>     }
>  
> +   if (ctx->pp)
> +      pp_free(ctx->pp);
> +
>     /* No particular reason to wait for command completion before
>      * destroying a context, but we flush the context here
>      * to avoid having to add code elsewhere to cope with flushing a
> @@ -172,10 +175,6 @@ dri_destroy_context(__DRIcontext * cPriv)
>      */
>     ctx->st->flush(ctx->st, 0, NULL);
>     ctx->st->destroy(ctx->st);
> -
> -   if (ctx->pp)
> -      pp_free(ctx->pp);
> -
>     free(ctx);
>  }
>  
> 

Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the mesa-dev mailing list