mesa: Ensure that gl_shader_program::InfoLog is never NULL
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 28 Jul 2011 22:10:17 +0000 (15:10 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 2 Aug 2011 15:23:15 +0000 (08:23 -0700)
commit89193933cbd322cd08fb54232411a8a9221fcca8
treedb9a6c9778c1ff35a819a7b2a4293604912c107e
parent379a32f42ebca9feeb024633f7774661619fd62e
mesa: Ensure that gl_shader_program::InfoLog is never NULL

This prevents assertion failures in ralloc_strcat.  The ralloc_free in
_mesa_free_shader_program_data can be omitted because freeing the
gl_shader_program in _mesa_delete_shader_program will take care of
this automatically.

A bunch of this code could use a refactor to use ralloc a bit more
effectively.  A bunch of the things that are allocated with malloc and
owned by the gl_shader_program should be allocated with ralloc (using
the gl_shader_program as the context).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/glsl/main.cpp
src/mesa/main/shaderobj.c