diff --git a/src/mesa/program/program_parse.y b/src/mesa/program/program_parse.y index bef20f4e766..ba4757ff74e 100644 --- a/src/mesa/program/program_parse.y +++ b/src/mesa/program/program_parse.y @@ -290,6 +290,11 @@ yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, } %} +/* The directive: %destructor is called to clean up the stack + * after a parser error. + */ +%destructor { free($$); } IDENTIFIER USED_IDENTIFIER + %% program: language optionSequence statementSequence END