[Mesa-dev] [PATCH] mesa: avoid leaking closure when iterating over a string_to_uint_map

Iago Toral itoral at igalia.com
Thu Oct 1 23:41:05 PDT 2015


Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>

On Thu, 2015-10-01 at 20:19 -0400, Ilia Mirkin wrote:
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
>  src/mesa/program/hash_table.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/mesa/program/hash_table.h b/src/mesa/program/hash_table.h
> index e85a836..d0a2abf 100644
> --- a/src/mesa/program/hash_table.h
> +++ b/src/mesa/program/hash_table.h
> @@ -249,6 +249,7 @@ public:
>        wrapper->closure = closure;
>  
>        hash_table_call_foreach(this->ht, subtract_one_wrapper, wrapper);
> +      free(wrapper);
>     }
>  
>     /**




More information about the mesa-dev mailing list