[Mesa-dev] [PATCH] st/mesa: Fix inversed test in st_api_destroy_drawable

Brian Paul brianp at vmware.com
Thu Jul 27 03:04:30 UTC 2017


On 07/26/2017 08:14 PM, Michel Dänzer wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> Fixes a drawable leak.
>
> Fixes: bbc29393d3be ("st/mesa: create framebuffer iface hash table per
>                        st manager")
> Tested-by: Nick Sarnie <commendsarnex at gmail.com>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
> ---
>   src/mesa/state_tracker/st_manager.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
> index 6447403fc6..97bf89fc65 100644
> --- a/src/mesa/state_tracker/st_manager.c
> +++ b/src/mesa/state_tracker/st_manager.c
> @@ -583,7 +583,7 @@ static void
>   st_api_destroy_drawable(struct st_api *stapi,
>                           struct st_framebuffer_iface *stfbi)
>   {
> -   if (stfbi)
> +   if (!stfbi)
>         return;
>
>      st_framebuffer_iface_remove(stfbi->state_manager, stfbi);
>

Reviewed-by: Brian Paul <brianp at vmware.com>



More information about the mesa-dev mailing list