From: Eric Anholt Date: Thu, 22 Jul 2010 06:21:23 +0000 (-0700) Subject: glsl2: Use talloc on InfoLog handling in ValidateProgram X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7095e2f860b91288c89c57add438e912e10df38e;p=mesa.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 cd02d7d8307..1c1665308e4 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); } }