From: Eric Anholt Date: Thu, 22 Jul 2010 06:21:23 +0000 (-0700) Subject: glsl2: Use talloc on InfoLog handling in ValidateProgram X-Git-Tag: 062012170305~10660^2~314 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7095e2f860b91288c89c57add438e912e10df38e;p=profile%2Fivi%2Fmesa.git glsl2: Use talloc on InfoLog handling in ValidateProgram Fixes a segfault in Regnum Online. --- diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index cd02d7d..1c16653 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -1380,9 +1380,9 @@ _mesa_validate_program(GLcontext *ctx, GLuint program) if (!shProg->Validated) { /* update info log */ if (shProg->InfoLog) { - free(shProg->InfoLog); + talloc_free(shProg->InfoLog); } - shProg->InfoLog = _mesa_strdup(errMsg); + shProg->InfoLog = talloc_strdup(shProg, errMsg); } }