[Mesa-dev] [PATCH mesa] vl: fix memory leak
Eric Engestrom
eric at engestrom.ch
Wed Jul 13 21:48:23 UTC 2016
On Wed, Jul 13, 2016 at 01:48:03PM +0200, Christian König wrote:
> 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?
You're entirely right, and that's a much better fix too.
v2 coming in a few minutes.
>
> 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