[Mesa-dev] [PATCH mesa v2] vl: fix memory leak
Christian König
deathsimple at vodafone.de
Tue Jul 19 10:42:09 UTC 2016
Yeah, already done so.
Regards,
Christian.
Am 18.07.2016 um 19:17 schrieb Nayan Deshmukh:
> Hi Guys,
>
> I don't have the push access. Can anyone please push the patch.
>
> Thanks,
> Nayan.
>
> On Thu, Jul 14, 2016 at 10:36 AM, Nayan Deshmukh
> <nayan26deshmukh at gmail.com <mailto:nayan26deshmukh at gmail.com>> wrote:
>
> Reviewed-by: Nayan Deshmukh <nayan26deshmukh at gmail.com
> <mailto:nayan26deshmukh at gmail.com>>
>
>
> On Thu, Jul 14, 2016 at 3:20 AM, Eric Engestrom <eric at engestrom.ch
> <mailto:eric at engestrom.ch>> wrote:
>
> CovID: 1363008
> Signed-off-by: Eric Engestrom <eric at engestrom.ch
> <mailto:eric at engestrom.ch>>
> ---
>
> v2: avoid using malloc() altogether (Christian König)
>
> ---
> src/gallium/auxiliary/vl/vl_bicubic_filter.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/src/gallium/auxiliary/vl/vl_bicubic_filter.c
> b/src/gallium/auxiliary/vl/vl_bicubic_filter.c
> index 25bc58c..51a0019 100644
> --- a/src/gallium/auxiliary/vl/vl_bicubic_filter.c
> +++ b/src/gallium/auxiliary/vl/vl_bicubic_filter.c
> @@ -242,7 +242,7 @@ vl_bicubic_filter_init(struct
> vl_bicubic_filter *filter, struct pipe_context *pi
> {
> struct pipe_rasterizer_state rs_state;
> struct pipe_blend_state blend;
> - struct vertex2f *offsets = NULL;
> + struct vertex2f offsets[16];
> struct pipe_sampler_state sampler;
> struct pipe_vertex_element ve;
> unsigned i;
> @@ -301,10 +301,6 @@ vl_bicubic_filter_init(struct
> vl_bicubic_filter *filter, struct pipe_context *pi
> if (!filter->ves)
> goto error_ves;
>
> - offsets = MALLOC(sizeof(struct vertex2f) * 16);
> - if (!offsets)
> - goto error_offsets;
> -
> offsets[0].x = -1.0f; offsets[0].y = -1.0f;
> offsets[1].x = 0.0f; offsets[1].y = -1.0f;
> offsets[2].x = 1.0f; offsets[2].y = -1.0f;
> @@ -344,8 +340,6 @@ vl_bicubic_filter_init(struct
> vl_bicubic_filter *filter, struct pipe_context *pi
> pipe->delete_vs_state(pipe, filter->vs);
>
> error_vs:
> -
> -error_offsets:
> pipe->delete_vertex_elements_state(pipe, filter->ves);
>
> error_ves:
> --
> 2.9.0
>
>
>
>
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160719/6c2ed7b3/attachment.html>
More information about the mesa-dev
mailing list