From 7095e2f860b91288c89c57add438e912e10df38e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 21 Jul 2010 23:21:23 -0700 Subject: [PATCH] glsl2: Use talloc on InfoLog handling in ValidateProgram Fixes a segfault in Regnum Online. --- src/mesa/shader/shader_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } } -- 2.30.2