glsl2: Use talloc on InfoLog handling in ValidateProgram
authorEric Anholt <eric@anholt.net>
Thu, 22 Jul 2010 06:21:23 +0000 (23:21 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 22 Jul 2010 06:21:23 +0000 (23:21 -0700)
Fixes a segfault in Regnum Online.

src/mesa/shader/shader_api.c

index cd02d7d..1c16653 100644 (file)
@@ -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);
    }
 }