[Mesa-dev] [PATCH mesa] vl: fix memory leak

Christian König deathsimple at vodafone.de
Wed Jul 13 11:48:03 UTC 2016


Good catch, since we need only 16 offsets I think we could simply 
allocate it on the stack as well.

Or am I missing something?

Regards,
Christian.

Am 13.07.2016 um 00:02 schrieb Eric Engestrom:
> CovID: 1363008
> Signed-off-by: Eric Engestrom <eric at engestrom.ch>
> ---
>   src/gallium/auxiliary/vl/vl_bicubic_filter.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/src/gallium/auxiliary/vl/vl_bicubic_filter.c b/src/gallium/auxiliary/vl/vl_bicubic_filter.c
> index 25bc58c..602424b 100644
> --- a/src/gallium/auxiliary/vl/vl_bicubic_filter.c
> +++ b/src/gallium/auxiliary/vl/vl_bicubic_filter.c
> @@ -338,12 +338,15 @@ vl_bicubic_filter_init(struct vl_bicubic_filter *filter, struct pipe_context *pi
>      if (!filter->fs)
>         goto error_fs;
>   
> +   FREE(offsets);
> +
>      return true;
>   
>   error_fs:
>      pipe->delete_vs_state(pipe, filter->vs);
>   
>   error_vs:
> +   FREE(offsets);
>   
>   error_offsets:
>      pipe->delete_vertex_elements_state(pipe, filter->ves);



More information about the mesa-dev mailing list