On Thu, 2009-03-05 at 08:50 -0800, Brian Paul wrote: > Module: Mesa > Branch: master > Commit: 6db24f449de9cc81e1f7bb2dde55a9819463d5e5 > URL: > http://cgit.freedesktop.org/mesa/mesa/commit/?id=6db24f449de9cc81e1f7bb2dde55a9819463d5e5 > > Author: Brian Paul <[email protected]> > Date: Thu Mar 5 09:49:00 2009 -0700 > > softpipe: added null ptr check for align_free() call in vbuf code > > Fixes GALLIUM_NOCELL path. See bug 20475. > > --- > > src/gallium/drivers/softpipe/sp_prim_vbuf.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/src/gallium/drivers/softpipe/sp_prim_vbuf.c > b/src/gallium/drivers/softpipe/sp_prim_vbuf.c > index eef6e58..e2b6a04 100644 > --- a/src/gallium/drivers/softpipe/sp_prim_vbuf.c > +++ b/src/gallium/drivers/softpipe/sp_prim_vbuf.c > @@ -90,7 +90,8 @@ sp_vbuf_allocate_vertices(struct vbuf_render *vbr, > unsigned size = vertex_size * nr_vertices; > > if (cvbr->vertex_buffer_size < size) { > - align_free(cvbr->vertex_buffer); > + if (cvbr->vertex_buffer) > + align_free(cvbr->vertex_buffer);
Hmm, shouldn't align_free() have similar semantics to free(), ie passing a NULL parameter is legal and a noop? Keith ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Mesa3d-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mesa3d-dev
