summaryrefslogtreecommitdiff
path: root/src/mesa/shader/shader_api.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-07-21 23:21:23 -0700
committerEric Anholt <eric@anholt.net>2010-07-21 23:21:23 -0700
commit7095e2f860b91288c89c57add438e912e10df38e (patch)
tree1869566abf7fd147df2699c0b0cfa99a122e243b /src/mesa/shader/shader_api.c
parente9384d1d7fdf06b6345b3be0a70a294b90eac96e (diff)
glsl2: Use talloc on InfoLog handling in ValidateProgram
Fixes a segfault in Regnum Online.
Diffstat (limited to 'src/mesa/shader/shader_api.c')
-rw-r--r--src/mesa/shader/shader_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c
index cd02d7d830..1c1665308e 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);
}
}