[Mesa-dev] [PATCH] st/mesa: fix unconditional return in st_framebuffer_iface_remove

Nicolai Hähnle nhaehnle at gmail.com
Wed Jul 26 13:51:42 UTC 2017


On 25.07.2017 18:30, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
> 
> Cc: 17.2 <mesa-stable at lists.freedesktop.org>
> ---
>   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 ede5439..78093ac 100644
> --- a/src/mesa/state_tracker/st_manager.c
> +++ b/src/mesa/state_tracker/st_manager.c
> @@ -553,21 +553,21 @@ st_framebuffer_iface_insert(struct st_manager *smapi,
>   
>   
>   static void
>   st_framebuffer_iface_remove(struct st_manager *smapi,
>                               struct st_framebuffer_iface *stfbi)
>   {
>      struct st_manager_private *smPriv =
>         (struct st_manager_private *)smapi->st_manager_private;
>      struct hash_entry *entry;
>   
> -   if (!smPriv || !smPriv->stfbi_ht);
> +   if (!smPriv || !smPriv->stfbi_ht)

Awesome :)

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

>         return;
>   
>      mtx_lock(&smPriv->st_mutex);
>      entry = _mesa_hash_table_search(smPriv->stfbi_ht, stfbi);
>      if (!entry)
>         goto unlock;
>   
>      _mesa_hash_table_remove(smPriv->stfbi_ht, entry);
>   
>   unlock:
> 


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the mesa-dev mailing list