[Mesa-dev] [PATCH 3/3] mesa: remove null check before free

Thomas H.P. Andersen phomes at gmail.com
Thu May 5 02:40:48 UTC 2016


On Wed, May 4, 2016 at 7:54 AM, Eduardo Lima Mitev <elima at igalia.com> wrote:

> Patch 2 and 3 are:
>
> Reviewed-by: Eduardo Lima Mitev <elima at igalia.com>
>

Thanks! I do not have commit access. Can I ask you to push (again)?


>
> I barely know about coccinelle scripts so I will let others look at
> first patch.
>
> Thanks
> Eduardo
>
> On 05/04/2016 06:15 AM, Thomas Hindoe Paaboel Andersen wrote:
> > ---
> >  src/mesa/main/readpix.c     | 3 +--
> >  src/mesa/main/texgetimage.c | 3 +--
> >  2 files changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
> > index 882d863..1cb06c7 100644
> > --- a/src/mesa/main/readpix.c
> > +++ b/src/mesa/main/readpix.c
> > @@ -608,8 +608,7 @@ read_rgba_pixels( struct gl_context *ctx,
> >                                               dst, format, type);
> >     }
> >
> > -   if (rgba)
> > -      free(rgba);
> > +   free(rgba);
> >
> >  done_swap:
> >     /* Handle byte swapping if required */
> > diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
> > index 4ac0ad4..fc3cc6b 100644
> > --- a/src/mesa/main/texgetimage.c
> > +++ b/src/mesa/main/texgetimage.c
> > @@ -557,8 +557,7 @@ get_tex_rgba_uncompressed(struct gl_context *ctx,
> GLuint dimensions,
> >     }
> >
> >  done:
> > -   if (rgba)
> > -      free(rgba);
> > +   free(rgba);
> >  }
> >
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160505/1837d43b/attachment-0001.html>


More information about the mesa-dev mailing list