| Index: src/glsl/glsl_lexer.ll
|
| diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll
|
| index 24cda0c45eae6242792474a6ce29ca7e1d9037d0..bd336d1893bf2ea5901a197b345cad6cc4fc32e2 100644
|
| --- a/src/glsl/glsl_lexer.ll
|
| +++ b/src/glsl/glsl_lexer.ll
|
| @@ -66,7 +66,8 @@ static int classify_identifier(struct _mesa_glsl_parse_state *, const char *);
|
| "Illegal use of reserved word `%s'", yytext); \
|
| return ERROR_TOK; \
|
| } else { \
|
| - yylval->identifier = strdup(yytext); \
|
| + void *mem_ctx = yyextra; \
|
| + yylval->identifier = ralloc_strdup(mem_ctx, yytext); \
|
| return classify_identifier(yyextra, yytext); \
|
| } \
|
| } while (0)
|
| @@ -208,7 +209,8 @@ HASH ^{SPC}#{SPC}
|
| <PP>[ \t\r]* { }
|
| <PP>: return COLON;
|
| <PP>[_a-zA-Z][_a-zA-Z0-9]* {
|
| - yylval->identifier = strdup(yytext);
|
| + void *mem_ctx = yyextra;
|
| + yylval->identifier = ralloc_strdup(mem_ctx, yytext);
|
| return IDENTIFIER;
|
| }
|
| <PP>[1-9][0-9]* {
|
| @@ -316,7 +318,8 @@ layout {
|
| || yyextra->ARB_fragment_coord_conventions_enable) {
|
| return LAYOUT_TOK;
|
| } else {
|
| - yylval->identifier = strdup(yytext);
|
| + void *mem_ctx = yyextra;
|
| + yylval->identifier = ralloc_strdup(mem_ctx, yytext);
|
| return IDENTIFIER;
|
| }
|
| }
|
|
|