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 cd02d7d83074b46f4891d11b110f06d776648559..1c1665308e40d29464ec0a30a6d53e64e9cb0b63 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);
    }
 }