summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--glsl_lexer.lpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/glsl_lexer.lpp b/glsl_lexer.lpp
index c15c99c4b0..fa439f1278 100644
--- a/glsl_lexer.lpp
+++ b/glsl_lexer.lpp
@@ -312,7 +312,9 @@ highp return HIGHP;
precision return PRECISION;
[_a-zA-Z][_a-zA-Z0-9]* {
- yylval->identifier = strdup(yytext);
+ struct _mesa_glsl_parse_state *state = yyextra;
+ void *ctx = talloc_parent(state);
+ yylval->identifier = talloc_strdup(ctx, yytext);
return IDENTIFIER;
}